gw  1.0.0
A bunch of small C++ utilities
Loading...
Searching...
No Matches
gw Namespace Reference

GW namespace. More...

Classes

class  basic_inplace_string
 A fixed-size string that stores the data in-place. More...
 
struct  crtp
 CRTP base class. More...
 
class  named_type
 Named type wrapper. More...
 
class  strong_type
 Strong type wrapper. More...
 

Concepts

concept  arithmetic
 Concept for arithmetic types.
 
concept  incrementable
 Concept for incrementable types.
 
concept  decrementable
 Concept for decrementable types.
 
concept  complete
 Concept for complete types.
 
concept  hashable
 Concept for hashable types.
 
concept  ostreamable
 Concept for ostreamable types.
 
concept  istreamable
 Concept for istreamable types.
 
concept  named
 Concept for named types.
 

Typedefs

template<std::size_t N>
using inplace_string = basic_inplace_string< N, char >
 A fixed-size string of char that stores the data in-place.
 
template<std::size_t N>
using inplace_wstring = basic_inplace_string< N, wchar_t >
 A fixed-size string of wchar_t that stores the data in-place.
 
template<std::size_t N>
using inplace_u16string = basic_inplace_string< N, char16_t >
 A fixed-size string of char16_t that stores the data in-place.
 
template<std::size_t N>
using inplace_u32string = basic_inplace_string< N, char32_t >
 A fixed-size string of char32_t that stores the data in-place.
 

Functions

template<typename CharT , std::size_t N>
 basic_inplace_string (const CharT(&)[N]) -> basic_inplace_string< N - 1U, CharT >
 Deduction guide for basic_inplace_string.
 
template<basic_inplace_string Name, typename T , typename... Args>
requires std::constructible_from<std::remove_cvref_t<T>, Args...>
constexpr auto make_named_type (Args &&... args) noexcept(std::is_nothrow_constructible_v< T, Args... >)
 Create a gw::named_type object.
 
template<basic_inplace_string Name, typename T , typename U , typename... Args>
requires std::constructible_from<T, std::initializer_list<U>&, Args...>
constexpr auto make_named_type (std::initializer_list< U > ilist, Args &&... args) noexcept(std::is_nothrow_constructible_v< T, std::initializer_list< U > &, Args... >)
 Create a gw::named_type object.
 
template<basic_inplace_string Name, typename T >
requires std::constructible_from<std::remove_cvref_t<T>, T>
constexpr auto make_named_type (T &&value) noexcept(std::is_nothrow_constructible_v< named_type< std::remove_cvref_t< T >, Name >, T >)
 Create a gw::named_type object.
 
template<typename Tag , typename T , typename... Args>
requires std::constructible_from<std::remove_cvref_t<T>, Args...>
constexpr auto make_strong_type (Args &&... args) noexcept(std::is_nothrow_constructible_v< T, Args... >)
 creates a gw::strong_type object
 
template<typename Tag , typename T , typename U , typename... Args>
requires std::constructible_from<T, std::initializer_list<U>&, Args...>
constexpr auto make_strong_type (std::initializer_list< U > ilist, Args &&... args) noexcept(std::is_nothrow_constructible_v< T, std::initializer_list< U > &, Args... >)
 creates a gw::strong_type object
 
template<typename Tag , typename T >
requires std::constructible_from<std::remove_cvref_t<T>, T>
constexpr auto make_strong_type (T &&value) noexcept(std::is_nothrow_constructible_v< strong_type< std::remove_cvref_t< T >, Tag >, T >)
 creates a gw::strong_type object
 

Detailed Description

GW namespace.