This file contains hidden or 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 <cstddef> | |
#include <iostream> | |
#include <string> | |
#include <utility> | |
using namespace std; | |
template <bool div3, bool div5> | |
struct printer | |
{ |
This file contains hidden or 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 <string> | |
#include <type_traits> | |
using namespace std; | |
struct Foo | |
{ | |
Foo() {} | |
Foo(const Foo&) |
This file contains hidden or 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 <cstddef> | |
#include <iostream> | |
#include <string> | |
#include <tuple> | |
#include <type_traits> | |
#include <utility> | |
using namespace std; | |
template <typename T> |
This file contains hidden or 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 <cstdint> | |
#include <iostream> | |
#include <iterator> | |
#include <type_traits> | |
using namespace std; | |
// ----------------------------------------------------------------------------- | |
// Traits for treating enums like flags, and/or giving the ability to loop over | |
// them |
This file contains hidden or 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 <cstddef> | |
#include <tuple> | |
#include <utility> | |
template <size_t I, typename T> | |
struct element_get_helper; | |
template <size_t I, typename... Ts> | |
struct element_get_helper<I, std::tuple<Ts...>> | |
{ |
This file contains hidden or 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 <cassert> | |
#include <iterator> | |
#include <memory> | |
#include <utility> | |
template <typename ForwardIt> | |
void my_inplace_merge(ForwardIt first, ForwardIt middle, ForwardIt last) | |
{ | |
if (first == middle || middle == last) return; |
This file contains hidden or 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 <functional> | |
#include <iostream> | |
#include <string> | |
#include <tuple> | |
#include <type_traits> | |
using namespace std; | |
// ----------------------------------------------------------------------------- | |
// A silly (in C++) application of the Curry-Howard isomorphism to produce the |
This file contains hidden or 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 <iostream> | |
#include <iterator> | |
#include <string> | |
#include <utility> | |
using namespace std; | |
template <typename FwdIt1, typename FwdIt2, typename T> | |
std::pair<FwdIt1, FwdIt1> find_delimited( |
This file contains hidden or 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 <cassert> | |
#include <iostream> | |
#include <iterator> | |
#include <map> | |
#include <numeric> | |
#include <sstream> | |
#include <string> | |
#include <utility> | |
#include <vector> |