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
//usr/bin/make -s "${0%.*}" CFLAGS="-O2 -Wall -Werror" && ./"${0%.*}" "$@"; s=$?; rm ./"${0%.*}"; exit $s | |
#include <stdio.h> | |
#include <stdbool.h> | |
enum option_tag { OPTION_SOME, OPTION_NONE }; | |
#define option_type(T) { enum option_tag tag; T some; } | |
#define SOME(S) { .tag = OPTION_SOME, .some = S } | |
#define NONE() { .tag = OPTION_NONE } |
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
#!/usr/bin/env python3 | |
def options(opts): | |
opts.load('compiler_cxx') | |
def configure(conf): | |
conf.load('compiler_cxx') | |
conf.check(features='cxx cxxprogram', cxxflags=['-std=c++14', '-Wall', '-Wextra', '-O3', '-pedantic', '-pipe'], uselib_store='M') |
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 <cstddef> | |
#include <utility> | |
template<class T, class... TT> | |
struct over_all { | |
using next = over_all<TT...>; | |
static const constexpr std::size_t size = 1 + next::size; | |
template<class C> |