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
namespace table { | |
namespace table_ { | |
struct id { | |
struct _name_t { | |
static constexpr const char* _get_name() { return "id"; } | |
template <typename T> | |
struct _member_t { | |
T id; | |
T& operator()() { return id; } | |
const T& operator()() const { return id; } |
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
namespace table { | |
namespace table_ { | |
struct id { | |
struct _name_t { | |
static constexpr const char* _get_name() {return "id";} | |
template <typename T> | |
struct _member_t { | |
T id; | |
T& operator()() {return id; } | |
const T& operator()() const {return id;} |
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 <iostream> | |
#include <cstdlib> | |
/***********************************************************************************/ | |
constexpr std::uint32_t fnv1a_r(const char *s, std::uint32_t h = 0x811c9dc5) { | |
return (*s == 0) ? h : fnv1a_r(s+1, ((h ^ (*s)) * 0x01000193)); | |
} | |
constexpr std::uint32_t fnv1a_i(const char *s) { |
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 <iostream> | |
#include <cstdint> | |
std::uint8_t num_of_bytes(std::uint64_t v) { | |
std::uint8_t c = 0; | |
c |= (!!(v & 0xFF00ull)); | |
c |= (!!(v & 0xFF0000ull)) << 1; | |
c |= (!!(v & 0xFF000000ull)) << 2; |
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 <tuple> | |
#include <type_traits> | |
struct any_type { template<class T> constexpr operator T(); }; | |
#if defined(__GNUC__) && !defined(__clang__) | |
# pragma GCC diagnostic push | |
# pragma GCC diagnostic ignored "-Wmissing-field-initializers" | |
#elif defined(__clang__) | |
# pragma clang diagnostic push |
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 <iostream> | |
#include <array> | |
#include <utility> | |
#include <string_view> | |
template<std::size_t...Idxs> | |
constexpr auto substring_as_array(std::string_view str, std::index_sequence<Idxs...>) { | |
return std::array{str[Idxs]..., '\n'}; | |
} |
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 <array> | |
#include <iostream> | |
#include <cassert> | |
#include <cstring> | |
#include <cstdint> | |
#if !defined(__fallthrough) && defined(__has_cpp_attribute) | |
#if __has_cpp_attribute(fallthrough) |
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 <iostream> | |
#include <array> | |
#include <cstdint> | |
enum e_permissions: std::size_t { | |
NONE = 0 | |
,SPOT = 1u << 0 | |
,MARGIN = 1u << 1 |
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
#!/bin/bash | |
THREADS=12 | |
CURRENT_DIR="$(pwd)" | |
CROSS_MINGW_PREFIX="$CURRENT_DIR/../mingw-w64-cross" | |
ORIGINAL_PATH="$PATH" | |
rm -rf "$CROSS_MINGW_PREFIX" |
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
#!/bin/bash | |
THREADS=12 | |
CROSS_MINGW_PREFIX="/home/nixman/mingw-w64-cross" | |
NATIVE_MINGW_PREFIX="/home/nixman/mingw-w64" | |
ORIGINAL_PATH="$PATH" | |
export PATH="$CROSS_MINGW_PREFIX/bin:$PATH" |
OlderNewer