NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches
Traits

Provides additional type trait utilities. More...

Typedefs

template<typename... Ts>
using nnl::utl::trait::void_t = typename make_void<Ts...>::type
 A type trait similar to std::void_t that allows for discarding overloads using SFINAE.

Variables

template<typename T>
constexpr bool nnl::utl::trait::has_data_member_v = has_data_member<T>::value
 Type trait to detect if a type T has a data() member function.
template<typename T>
constexpr bool nnl::utl::trait::has_size_member_v = has_size_member<T>::value
 Type trait to detect if a type T has a size() member function.
template<typename T>
constexpr bool nnl::utl::trait::has_resize_member_v = has_resize_member<T>::value
 Type trait to detect if a type T has a resize() member function.
template<typename T>
constexpr bool nnl::utl::trait::has_value_type_v = has_value_type<T>::value
 Type trait to detect if a type T defines a nested value_type.
template<typename T>
constexpr bool nnl::utl::trait::is_iterable_v = is_iterable<T>::value
 Type trait to check if a type T is iterable.
template<typename T>
constexpr bool nnl::utl::trait::is_contiguous_v = is_iterable_v<T> && has_data_member_v<T> && has_size_member_v<T>
 Type trait to check if a type T represents a contiguous range.
template<typename T>
constexpr bool nnl::utl::trait::is_non_contiguous_v = is_iterable_v<T> && !has_data_member_v<T>
 Type trait to check if a type T represents a non-contiguous range.

Detailed Description

Provides additional type trait utilities.

Typedef Documentation

◆ void_t

template<typename... Ts>
using nnl::utl::trait::void_t = typename make_void<Ts...>::type

A type trait similar to std::void_t that allows for discarding overloads using SFINAE.

Variable Documentation

◆ has_data_member_v

template<typename T>
bool nnl::utl::trait::has_data_member_v = has_data_member<T>::value
constexpr

Type trait to detect if a type T has a data() member function.

Template Parameters
TThe type to inspect.

◆ has_resize_member_v

template<typename T>
bool nnl::utl::trait::has_resize_member_v = has_resize_member<T>::value
constexpr

Type trait to detect if a type T has a resize() member function.

Template Parameters
TThe type to inspect.

◆ has_size_member_v

template<typename T>
bool nnl::utl::trait::has_size_member_v = has_size_member<T>::value
constexpr

Type trait to detect if a type T has a size() member function.

Template Parameters
TThe type to inspect.

◆ has_value_type_v

template<typename T>
bool nnl::utl::trait::has_value_type_v = has_value_type<T>::value
constexpr

Type trait to detect if a type T defines a nested value_type.

Template Parameters
TThe type to inspect.

◆ is_contiguous_v

template<typename T>
bool nnl::utl::trait::is_contiguous_v = is_iterable_v<T> && has_data_member_v<T> && has_size_member_v<T>
constexpr

Type trait to check if a type T represents a contiguous range.

Template Parameters
TThe type to inspect.

◆ is_iterable_v

template<typename T>
bool nnl::utl::trait::is_iterable_v = is_iterable<T>::value
constexpr

Type trait to check if a type T is iterable.

Template Parameters
TThe type to inspect.

◆ is_non_contiguous_v

template<typename T>
bool nnl::utl::trait::is_non_contiguous_v = is_iterable_v<T> && !has_data_member_v<T>
constexpr

Type trait to check if a type T represents a non-contiguous range.

Template Parameters
TThe type to inspect.