This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN | |
#include <doctest/doctest.h> | |
#include <restinio/helpers/http_field_parsers/host.hpp> | |
namespace example | |
{ | |
namespace ep = restinio::easy_parser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined( "UNIX" ) && !defined( "GNU" ) | |
define "GNU"; | |
objPath = "o"; | |
if !defined( "NOAUTODEP" ) { | |
autodepIncludePathList += "."; | |
autodepIncludePathList += "h"; | |
autodepIncludePathList += "mxx/h"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <vector> | |
#include <so_5/all.hpp> | |
using hires_clock = std::chrono::high_resolution_clock; | |
struct msg_01 final : public so_5::signal_t {}; | |
struct msg_02 final : public so_5::signal_t {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Источник: https://eao197.blogspot.com/2023/03/progc-taggedvaluet.html | |
Компилятор clang 14.0.6. | |
Объемная версия на базе SFINAE: | |
----- | |
$ clang++-14 -std=c++17 -pedantic -Wall -o t1_clang14 t1.cpp | |
t1.cpp:198:24: error: overload resolution selected deleted operator '<' | |
const auto cr = (bin1 < bin2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <memory> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
template< typename T > | |
class protected_ptr | |
{ | |
shared_ptr<T> m_object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <condition_variable> | |
#include <iostream> | |
#include <mutex> | |
#include <thread> | |
using namespace std::chrono; | |
struct lock_context | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <restinio/all.hpp> | |
#include <restinio/helpers/http_field_parsers/content-type.hpp> | |
#include <fmt/format.h> | |
using router_t = restinio::router::express_router_t<>; | |
auto handle_post_body( | |
const restinio::request_handle_t & req ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <restinio/all.hpp> | |
#include <so_5/all.hpp> | |
#include <random> | |
// Message for transfer requests from RESTinio's thread to processing thread. | |
struct handle_request | |
{ | |
restinio::request_handle_t m_req; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template< typename Payload, typename Envelope > | |
class basic_message_holder_impl_t | |
{ | |
protected : | |
intrusive_ptr_t< Envelope > m_msg; | |
public : | |
using payload_type = Payload; | |
using envelope_type = Envelope; |