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 NOMINMAX | |
#include <windows.h> | |
#include <iostream> | |
#include <stdexcept> | |
#include <vector> | |
#include <print> | |
#include <format> | |
void |
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 <typeindex> | |
#include <stdexcept> | |
enum class message_mutability_t | |
{ | |
immutable_message, | |
mutable_message | |
}; |
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 <typeindex> | |
#include <stdexcept> | |
class message_upcaster_t; | |
using upcaster_factory_t = message_upcaster_t (*)() noexcept; | |
class message_upcaster_t | |
{ | |
std::type_index m_self_type; |
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 <algorithm> | |
#include <array> | |
#include <chrono> | |
#include <iostream> | |
#include <span> | |
#include <string> | |
#include <string_view> | |
#include <cstdint> | |
namespace restinio |
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 <condition_variable> | |
#include <functional> | |
#include <iostream> | |
#include <mutex> | |
#include <queue> | |
#include <thread> | |
#include <vector> | |
namespace demo | |
{ |
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://en.cppreference.com/w/cpp/container | |
*/ | |
/*** | |
Задача стандартной библиотеки -- быть стандартной библиотекой. |
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
/*** | |
Класс std::thread | |
*/ | |
#include <iostream> | |
#include <thread> | |
void SayHello() |
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
/*** | |
SFINAE: Substitution failure is not an error | |
*/ | |
// В основном базируется на std::enable_if | |
// https://en.cppreference.com/w/cpp/types/enable_if | |
#include <type_traits> |
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
/*** | |
Реализация шаблона должна быть доступна компилятору. | |
Поэтому шаблоны размещают в .hpp-файлах | |
*/ | |
///////////////////////////////////////////////////// | |
/*** |
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 <so_5/all.hpp> | |
namespace example | |
{ | |
class a_stats_listener_t final : public so_5::agent_t | |
{ | |
public : | |
a_stats_listener_t( context_t ctx ) | |
: so_5::agent_t( std::move(ctx) ) |
NewerOlder