VCCC  2024.05
VisualCamp Common C++ library
utility

Utility libraries. More...

Detailed Description

Modules

 Runtime Assertion
 
 Integer Sequence
 
 Time Utility
 

Classes

struct  compressed_pair_empty_t
 
class  compressed_pair< T, U >
 An size-optimized pair using empty base optimization. More...
 
struct  in_place_t
 in-place construction tag More...
 
struct  in_place_type_t< T >
 
struct  in_place_index_t< I >
 
struct  nontype_t< V >
 value construction tag More...
 
struct  type_sequence< Types >
 
struct  type_sequence_type_count< T, TS >
 count the number of occurences of T in type_sequence More...
 
struct  type_sequence_type_index< T, TS >
 get the index of T in type_sequence. More...
 
struct  type_sequence_element_type< I, TS >
 get type of \(I\)-th element of type_sequence More...
 
struct  type_sequence_element_type< I, type_sequence<> >
 
struct  type_sequence_element_type< 0, type_sequence< U, Us... > >
 
struct  type_sequence_element_type< I, type_sequence< U, Us... > >
 

Typedefs

template<typename T , std::size_t N>
using make_type_sequence = typename detail::make_type_sequence_impl< T, N >::type
 create a type_sequence that holds T of N times More...
 
template<std::size_t I, typename TS >
using type_sequence_element_type_t = typename type_sequence_element_type< I, TS >::type
 

Functions

template<typename T >
constexpr std::add_const_t< T > & as_const (T &t) noexcept
 obtains a reference to const to its argument More...
 
template<typename T >
void as_const (T &&)=delete
 
template<typename T , typename U >
constexpr bool cmp_equal (T t, U u) noexcept
 
template<typename T , typename U >
constexpr bool cmp_not_equal (T t, U u) noexcept
 
template<typename T , typename U >
constexpr bool cmp_less (T t, U u) noexcept
 
template<typename T , typename U >
constexpr bool cmp_greater (T t, U u) noexcept
 
template<class T , class U >
constexpr bool cmp_less_equal (T t, U u) noexcept
 
template<class T , class U >
constexpr bool cmp_greater_equal (T t, U u) noexcept
 
template<typename T , typename U >
constexpr std::enable_if_t< conjunction< is_swappable< T >, is_swappable< U > >::valueswap (compressed_pair< T, U > &lhs, compressed_pair< T, U > &rhs) noexcept(conjunction< is_nothrow_swappable< T >, is_nothrow_swappable< U >>::value)
 
template<typename R , typename T >
constexpr bool in_range (T t) noexcept
 
template<typename T , T... v, typename F >
constexpr std::enable_if_t< detail::sequence_for_each_invocable< std::integer_sequence< T, v... >, F >::valuesequence_for_each (std::integer_sequence< T, v... >, F &&f)
 performs f(std::integral_constant<T, i>{}) for i in v... More...
 
template<typename T , T N, typename F >
constexpr std::enable_if_t< detail::sequence_for_each_invocable< std::make_integer_sequence< T, N >, F >::valuesequence_for_each (F &&f)
 performs f(std::integral_constant<T, i>{}) for i in [0, N) More...
 
template<std::size_t N, typename F >
constexpr std::enable_if_t< detail::sequence_for_each_invocable< std::make_index_sequence< N >, F >::valuesequence_for_each (F &&f)
 performs f(std::integral_constant<std::size_t, i>{}) for i in [0, N) More...
 
template<typename Enum >
constexpr std::underlying_type_t< Enum > & as_const (Enum e) noexcept
 converts an enumeration to its underlying type More...
 

Variables

constexpr VCCC_INLINE_OR_STATIC compressed_pair_empty_t compressed_pair_empty
 
constexpr VCCC_INLINE_OR_STATIC in_place_t in_place {}
 
template<typename T >
constexpr VCCC_INLINE_OR_STATIC in_place_type_t< T > in_place_type {}
 
template<std::size_t I>
constexpr VCCC_INLINE_OR_STATIC in_place_index_t< I > in_place_index {}
 
template<typename T >
constexpr VCCC_INLINE_OR_STATIC nontype_t< T > nontype {}
 

Typedef Documentation

◆ make_type_sequence

using make_type_sequence = typename detail::make_type_sequence_impl<T, N>::type

◆ type_sequence_element_type_t

Function Documentation

◆ as_const() [1/3]

constexpr std::underlying_type_t<Enum>& vccc::as_const ( Enum  e)
constexprnoexcept

◆ as_const() [2/3]

void vccc::as_const ( T &&  )
delete

◆ as_const() [3/3]

constexpr std::add_const_t<T>& vccc::as_const ( T &  t)
constexprnoexcept
See also
std::as_const

◆ cmp_equal()

constexpr bool vccc::cmp_equal ( t,
u 
)
constexprnoexcept

◆ cmp_greater()

constexpr bool vccc::cmp_greater ( t,
u 
)
constexprnoexcept

◆ cmp_greater_equal()

constexpr bool vccc::cmp_greater_equal ( t,
u 
)
constexprnoexcept

◆ cmp_less()

constexpr bool vccc::cmp_less ( t,
u 
)
constexprnoexcept

◆ cmp_less_equal()

constexpr bool vccc::cmp_less_equal ( t,
u 
)
constexprnoexcept

◆ cmp_not_equal()

constexpr bool vccc::cmp_not_equal ( t,
u 
)
constexprnoexcept

◆ in_range()

constexpr bool vccc::in_range ( t)
constexprnoexcept

◆ sequence_for_each() [1/3]

constexpr std::enable_if_t<detail::sequence_for_each_invocable<std::make_integer_sequence<T, N>, F>::value> vccc::sequence_for_each ( F &&  f)
constexpr

◆ sequence_for_each() [2/3]

constexpr std::enable_if_t<detail::sequence_for_each_invocable<std::make_index_sequence<N>, F>::value> vccc::sequence_for_each ( F &&  f)
constexpr

◆ sequence_for_each() [3/3]

constexpr std::enable_if_t<detail::sequence_for_each_invocable<std::integer_sequence<T, v...>, F>::value> vccc::sequence_for_each ( std::integer_sequence< T, v... >  ,
F &&  f 
)
constexpr

◆ swap()

constexpr std::enable_if_t<conjunction<is_swappable<T>, is_swappable<U> >::value> vccc::swap ( compressed_pair< T, U > &  lhs,
compressed_pair< T, U > &  rhs 
)
constexprnoexcept

Variable Documentation

◆ compressed_pair_empty

constexpr VCCC_INLINE_OR_STATIC compressed_pair_empty_t compressed_pair_empty
constexpr

◆ in_place

constexpr VCCC_INLINE_OR_STATIC in_place_t in_place {}
constexpr

◆ in_place_index

constexpr VCCC_INLINE_OR_STATIC in_place_index_t<I> in_place_index {}
constexpr

◆ in_place_type

constexpr VCCC_INLINE_OR_STATIC in_place_type_t<T> in_place_type {}
constexpr

◆ nontype

constexpr VCCC_INLINE_OR_STATIC nontype_t<T> nontype {}
constexpr