Skip to content

Instantly share code, notes, and snippets.

View nlyan2025's full-sized avatar

Andrew nlyan2025

  • London, England
View GitHub Profile
#include <boost/preprocessor.hpp>
// the magic
#define MAGIC_PLACEHOLDER_FILLER_0(X, Y) ((X, Y)) MAGIC_PLACEHOLDER_FILLER_1
#define MAGIC_PLACEHOLDER_FILLER_1(X, Y) ((X, Y)) MAGIC_PLACEHOLDER_FILLER_0
#define MAGIC_PLACEHOLDER_FILLER_0_END
#define MAGIC_PLACEHOLDER_FILLER_1_END
// example usage
#include <array>
#include <boost/fusion/adapted/adt/adapt_adt.hpp>
#include <boost/preprocessor.hpp>
#include <stdexcept>
#include "faef.hpp"
#define DEFINE_INIT_LIST_PLACEHOLDER_0_END
#define DEFINE_INIT_LIST_PLACEHOLDER_1_END
#define DEFINE_INIT_LIST_PLACEHOLDER_0(X, Y, Z) \
#include <boost/asio/buffer.hpp>
#include <boost/container/deque.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <string>
struct strings_deque_buffer_reference
{
std::string& str;
operator boost::asio::mutable_buffer() const noexcept { return boost::asio::buffer(str); }
operator boost::asio::const_buffer() const noexcept { return boost::asio::buffer(str); }
#include <atomic>
#include <cstdint>
#include <thread>
#include <iostream>
struct SeqLockThing
{
std::atomic<std::uint64_t> begin_version = 0;
int a = 0;
int b = 0;
#include <cstring>
#include <string_view>
#include <tuple>
#include <charconv>
#include <iostream>
template <typename CRTP>
class UnbufferedPushDecoder
{
public: