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 <type_traits> | |
namespace { | |
unsigned char v{}; | |
constexpr bool is_constant_evaluated(const unsigned char* e = &v) { | |
return e - 0x6017d2; // memory dependent constant value, check output first line | |
} | |
} |
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 <tuple> | |
#include <boost/callable_traits.hpp> | |
#include <boost/type_index/ctti_type_index.hpp> | |
#include <boost/preprocessor/seq/for_each.hpp> | |
#include <boost/preprocessor/variadic/to_seq.hpp> | |
template<template <typename> typename Base, std::size_t ...Dependents> | |
struct Depends : Base<Depends<Base, Dependents...>> { |
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 <boost/utility/base_from_member.hpp> | |
#include <boost/range/any_range.hpp> | |
#include <boost/iterator/iterator_traits.hpp> | |
#include <any> | |
#include <type_traits> | |
template<typename T, typename Traversal = boost::forward_traversal_tag> | |
struct collection : boost::base_from_member<std::any>, | |
boost::base_from_member<std::function<boost::any_range<T, Traversal>(std::any&)>>, | |
boost::any_range<T, Traversal> { |
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
#pragma once | |
#include <boost/iterator/iterator_categories.hpp> | |
#include <boost/iterator/iterator_adaptor.hpp> | |
namespace bxlx { | |
namespace detail { | |
template<typename Proxy> | |
struct enable_proxy { | |
Proxy p; |
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
import streamlit as st | |
import io | |
import contextlib | |
import sys | |
import re | |
import threading | |
class _Redirect: | |
class IOStuff(io.StringIO): |
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 <type_traits> | |
#if __has_include(<alloca.h>) | |
#include <alloca.h> | |
#else | |
#define alloca _alloca | |
#endif | |
namespace bxlx { |
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 <type_traits> | |
#include <string_view> | |
#include <iostream> | |
#include <atomic> | |
#include <utility> | |
#include <tuple> | |
#include <cassert> | |
template<char... Chars> | |
struct str { |
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 <type_traits> | |
namespace bxlx { | |
namespace impl { | |
template<typename T, typename = void> | |
struct add_long { | |
using type = T; | |
}; | |
template<> |
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 <tuple> | |
#include <limits> | |
#define BXLX_MAXIMUM_ARG_TEMPLATE_LAMBDA 100 | |
namespace bxlx { | |
namespace impl { | |
template<std::size_t> | |
struct arg { | |
using type = arg; |
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
// see at godbolt : https://godbolt.org/z/zMGEGs99v | |
#include <string_view> | |
template<auto V> | |
constexpr static auto n() noexcept { | |
#ifdef _MSC_VER | |
std::string_view sv = __FUNCSIG__; | |
auto to = sv.rfind('>')-1; | |
for (std::size_t close = sv[to] == ')'; close > 0; ) { |
OlderNewer