![]() |
C++ Library Extensions 2022.12.09
To help learn modern C++ programming
|
Namespaces | |
namespace | hidden |
Classes | |
struct | bit_pattern |
Typedefs | |
template<typename T > | |
using | enable_if_integral = std::enable_if_t< std::is_integral< T >::value > |
template<typename T , typename = enable_if_integral<T>> | |
using | unsigned_t = std::make_unsigned_t< T > |
template<typename T , typename = enable_if_integral<T>> | |
using | signed_t = std::make_signed_t< T > |
template<typename S , typename T > | |
using | common_t = std::common_type_t< S, T > |
template<typename S , typename T , typename = enable_if_integral<S>, typename = enable_if_integral<T>> | |
using | signed_common_t = signed_t< common_t< S, T > > |
template<typename S , typename T , typename = enable_if_integral<S>, typename = enable_if_integral<T>> | |
using | unsigned_common_t = unsigned_t< common_t< S, T > > |
Functions | |
template<typename T , typename = enable_if_integral<T>> | |
int | count_set_bits (T bits) |
template<typename T , typename = enable_if_integral<T>> | |
std::string | to_bits (T bits) |
template<typename T , typename = enable_if_integral<T>> | |
std::string | to_hex (T v) |
template<typename T , std::size_t N> | |
std::string | to_hex_reverse (T(&v)[N]) |
template<typename T , std::size_t N> | |
std::string | to_hex (T(&v)[N]) |
template<typename T , typename = enable_if_integral<T>> | |
std::string | to_dec (T v) |
template<typename T , std::size_t N> | |
std::string | to_dec_reverse (T(&v)[N]) |
template<typename T , std::size_t N> | |
std::string | to_dec (T(&v)[N]) |
template<typename T , typename = enable_if_integral<T>> | |
int | field_with (T v) |
template<typename T , typename = enable_if_integral<T>> | |
int | numeric_width () |
template<typename T , typename = enable_if_integral<T>> | |
std::string | to_dec_width (T v) |
template<typename T , typename = enable_if_integral<T>> | |
std::string | numeric_base (T v) |
template<typename T , typename = enable_if_integral<T>> | |
std::string | numeric_type_info () |
template<typename = void> | |
std::string | integral_type_info () |
template<typename T , typename = enable_if_integral<T>> | |
std::string | twos_complement (T c) |
Variables | |
template<typename T > | |
constexpr bool | is_char_v = hidden::st_is_character<T>::value |
template<typename T > | |
constexpr T | limits_max = std::numeric_limits<T>::max() |
template<typename T > | |
constexpr T | limits_min = std::numeric_limits<T>::min() |
template<typename T > | |
constexpr int | sizeof_bits = sizeof(T) * 8 |
template<typename T > | |
constexpr unsigned_t< T > | high_bit_mask = unsigned_t<T>(1) << (sizeof_bits<T>-1) |
using tpf::bitwise::common_t = typedef std::common_type_t<S, T> |
Definition at line 75 of file tpf_bitwise.hpp.
using tpf::bitwise::enable_if_integral = typedef std::enable_if_t<std::is_integral<T>::value> |
Definition at line 66 of file tpf_bitwise.hpp.
using tpf::bitwise::signed_common_t = typedef signed_t<common_t<S, T> > |
Definition at line 80 of file tpf_bitwise.hpp.
using tpf::bitwise::signed_t = typedef std::make_signed_t<T> |
Definition at line 72 of file tpf_bitwise.hpp.
using tpf::bitwise::unsigned_common_t = typedef unsigned_t<common_t<S, T> > |
Definition at line 85 of file tpf_bitwise.hpp.
using tpf::bitwise::unsigned_t = typedef std::make_unsigned_t<T> |
Definition at line 69 of file tpf_bitwise.hpp.
int tpf::bitwise::count_set_bits | ( | T | bits | ) |
Definition at line 95 of file tpf_bitwise.hpp.
int tpf::bitwise::field_with | ( | T | v | ) |
std::string tpf::bitwise::integral_type_info | ( | ) |
Definition at line 307 of file tpf_bitwise.hpp.
std::string tpf::bitwise::numeric_base | ( | T | v | ) |
Definition at line 281 of file tpf_bitwise.hpp.
std::string tpf::bitwise::numeric_type_info | ( | ) |
int tpf::bitwise::numeric_width | ( | ) |
std::string tpf::bitwise::to_bits | ( | T | bits | ) |
Definition at line 108 of file tpf_bitwise.hpp.
std::string tpf::bitwise::to_dec | ( | T | v | ) |
std::string tpf::bitwise::to_dec | ( | T(&) | v[N] | ) |
std::string tpf::bitwise::to_dec_reverse | ( | T(&) | v[N] | ) |
std::string tpf::bitwise::to_dec_width | ( | T | v | ) |
std::string tpf::bitwise::to_hex | ( | T | v | ) |
std::string tpf::bitwise::to_hex | ( | T(&) | v[N] | ) |
std::string tpf::bitwise::to_hex_reverse | ( | T(&) | v[N] | ) |
std::string tpf::bitwise::twos_complement | ( | T | c | ) |
|
constexpr |
Definition at line 91 of file tpf_bitwise.hpp.
|
constexpr |
Definition at line 53 of file tpf_bitwise.hpp.
|
constexpr |
Definition at line 55 of file tpf_bitwise.hpp.
|
constexpr |
Definition at line 56 of file tpf_bitwise.hpp.
|
constexpr |
Definition at line 88 of file tpf_bitwise.hpp.