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 <type_traits> | |
#include <memory> | |
#include <vector> | |
#include <iostream> | |
namespace buffer | |
{ | |
template <class 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 <type_traits> | |
#include <memory> | |
#include <iostream> | |
namespace buffer | |
{ | |
template <class Type> | |
struct TView |
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 <type_traits> | |
#include <memory> | |
#include <vector> | |
#include <iostream> | |
namespace buffer | |
{ | |
template <class 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
// http://coliru.stacked-crooked.com/a/79b95603bd598fc4 | |
// http://coliru.stacked-crooked.com/a/329eb69e036b8d4b | |
// http://coliru.stacked-crooked.com/a/3a4c06d979ae966c | |
// http://coliru.stacked-crooked.com/a/e81b99fdd5e2b596 | |
#include <type_traits> | |
#include <iostream> | |
#include <utility> | |
#include <cstdint> | |
#include <vector> | |
#include <cmath> |
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://coliru.stacked-crooked.com/a/0ba6c5762255a8e3 | |
#include <iostream> | |
#include <utility> | |
#include <cstdint> | |
class XorShifter | |
{ | |
public: |
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
// http://coliru.stacked-crooked.com/a/f567a9698865eb15 | |
#include <type_traits> | |
#include <utility> | |
#include <cstdint> | |
#include <memory> | |
#include <iostream> | |
/******************************** |
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 <functional> | |
#include <iostream> | |
#include <limits> | |
#include <vector> | |
#include <stack> | |
enum Token | |
{ | |
NUM, | |
ADD, // from there the token are stripped from the tree |
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
// http://coliru.stacked-crooked.com/a/5f6f08cff6f9a5b7 | |
#include <iostream> | |
auto lit(const int value) | |
{ | |
return [value](auto visitor) { return visitor.lit(value); }; | |
} | |
template <class LHS, | |
class RHS> |
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://coliru.stacked-crooked.com/a/a138703355819566 | |
#include <string_view> | |
#include <iostream> | |
#include <cstdint> | |
template <uint8_t low, | |
uint8_t high> | |
struct TIsBetween | |
{ |
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
// http://coliru.stacked-crooked.com/a/f49adfd932697df3 | |
#include <iostream> | |
#include <cstdint> | |
static const uint8_t BYTE_UNDERSCORE = static_cast<uint8_t>('_'); | |
static const uint8_t BYTE_ZERO = static_cast<uint8_t>('0'); | |
static const uint8_t BYTE_NINE = static_cast<uint8_t>('9'); | |
static const uint8_t BYTE_A_MIN = static_cast<uint8_t>('a'); | |
static const uint8_t BYTE_Z_MIN = static_cast<uint8_t>('z'); |