Skip to content

Instantly share code, notes, and snippets.

View AndrewRademacher's full-sized avatar

Andrew Rademacher AndrewRademacher

View GitHub Profile
@AndrewRademacher
AndrewRademacher / main.cpp
Created May 5, 2019 17:51
testing for proximity to end of iterator in all cases except input iterator.
#include <string>
#include <iostream>
#include <vector>
#include <array>
#include <set>
#include <unordered_set>
template<typename T>
void printElems(T elems) {
std::cout << "[ ";
#include <boost/asio.hpp>
#include <boost/asio/bind_executor.hpp>
#include <boost/asio/spawn.hpp>
#include <boost/bind.hpp>
#include <chrono>
#include <random>
#include <spdlog/spdlog.h>
#include <thread>
int32_t next_int() {
#include <boost/callable_traits.hpp>
#include <fmt/format.h>
#include <tuple>
void increment_int(int a) { fmt::print("{}\n", a + 1); }
void increment_double(double a) { fmt::print("{}\n", std::pow(a, 2)); }
void increment_both(int a, double b) {
auto ia = a + 1;