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 <string> | |
#include <memory> | |
#include <cstdlib> | |
#if defined __clang__ || defined __GNUC__ | |
#include <cxxabi.h> | |
#endif | |
template<typename T> | |
const std::string demangle() noexcept | |
{ |
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 <string> | |
#include <string_view> | |
#include <vector> | |
#include <sstream> | |
#include <array> | |
#include <cstdlib> | |
constexpr std::array ones {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten"}; | |
constexpr std::array teens {"eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"}; |
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
/----------------------------------------------------------------------------------------- | |
// Copyright (C) 2022-23 Fix8 Market Technologies Pty Ltd | |
// by David L. Dight | |
// | |
// call_once_with_result - a std::call_once storing the callable object's result and making it available | |
// class once_with_result and function call_once_with_result | |
// | |
// Permission is hereby granted, free of charge, to any person or organization | |
// obtaining a copy of the software and accompanying documentation covered by | |
// this license (the "Software") to use, reproduce, display, distribute, |
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
//----------------------------------------------------------------------------------------- | |
// Copyright (C) 2022-23 Fix8 Market Technologies Pty Ltd | |
// by David L. Dight | |
// | |
// make_pow_array - create compiler generated constexpr C++20 arbitrary base and size power | |
// tables as std::array. Examples include uint128_t, bases 2, 3, 5, 8, 10, with constexpr | |
// printer and demangler. Uses folding, variable templates, constraints. | |
// | |
// Distributed under the Boost Software License, Version 1.0 August 17th, 2003 | |
// |