clipp::traits Namespace Reference

type traits (NOT FOR DIRECT USE IN CLIENT CODE!) no interface guarantees; might be changed or removed in the future More...

Classes

struct  has_size_getter
 
struct  is_callable
 
struct  is_callable< Fn, Ret(Args...)>
 
struct  is_callable< Fn, void(Args...)>
 
struct  is_input_range
 

Functions

template<class Fn , class Ret , class... Args>
constexpr auto check_is_callable (int) -> decltype(std::declval< Fn >()(std::declval< Args >()...), std::integral_constant< bool, std::is_same< Ret, typename std::result_of< Fn(Args...)>::type >::value >
 function (class) signature type trait More...
 
template<class , class , class... >
constexpr auto check_is_callable (long) -> std::false_type
 
template<class Fn , class Ret >
constexpr auto check_is_callable_without_arg (int) -> decltype(std::declval< Fn >()(), std::integral_constant< bool, std::is_same< Ret, typename std::result_of< Fn()>::type >::value >
 
template<class , class >
constexpr auto check_is_callable_without_arg (long) -> std::false_type
 
template<class Fn , class... Args>
constexpr auto check_is_void_callable (int) -> decltype(std::declval< Fn >()(std::declval< Args >()...), std::true_type
 
template<class , class , class... >
constexpr auto check_is_void_callable (long) -> std::false_type
 
template<class Fn >
constexpr auto check_is_void_callable_without_arg (int) -> decltype(std::declval< Fn >()(), std::true_type
 
template<class >
constexpr auto check_is_void_callable_without_arg (long) -> std::false_type
 
template<class T >
constexpr auto check_is_input_range (int) -> decltype(begin(std::declval< T >()), end(std::declval< T >()), std::true_type
 input range type trait More...
 
template<class T >
constexpr auto check_is_input_range (char) -> decltype(std::begin(std::declval< T >()), std::end(std::declval< T >()), std::true_type
 
template<class >
constexpr auto check_is_input_range (long) -> std::false_type
 
template<class T >
constexpr auto check_has_size_getter (int) -> decltype(std::declval< T >().size(), std::true_type
 size() member type trait More...
 
template<class >
constexpr auto check_has_size_getter (long) -> std::false_type
 

Detailed Description

type traits (NOT FOR DIRECT USE IN CLIENT CODE!) no interface guarantees; might be changed or removed in the future

Function Documentation

◆ check_has_size_getter() [1/2]

template<class T >
constexpr auto clipp::traits::check_has_size_getter ( int  ) -> decltype(std::declval<T>().size(), std::true_type
constexpr

size() member type trait

Definition at line 253 of file clipp.h.

◆ check_has_size_getter() [2/2]

template<class >
constexpr auto clipp::traits::check_has_size_getter ( long  ) -> std::false_type
constexpr

◆ check_is_callable() [1/2]

template<class Fn , class Ret , class... Args>
constexpr auto clipp::traits::check_is_callable ( int  ) -> decltype( std::declval<Fn>()(std::declval<Args>()...), std::integral_constant<bool, std::is_same<Ret,typename std::result_of<Fn(Args...)>::type>::value>
constexpr

function (class) signature type trait

Definition at line 149 of file clipp.h.

◆ check_is_callable() [2/2]

template<class , class , class... >
constexpr auto clipp::traits::check_is_callable ( long  ) -> std::false_type
constexpr

◆ check_is_callable_without_arg() [1/2]

template<class Fn , class Ret >
constexpr auto clipp::traits::check_is_callable_without_arg ( int  ) -> decltype( std::declval<Fn>()(), std::integral_constant<bool, std::is_same<Ret,typename std::result_of<Fn()>::type>::value>
constexpr

Definition at line 160 of file clipp.h.

◆ check_is_callable_without_arg() [2/2]

template<class , class >
constexpr auto clipp::traits::check_is_callable_without_arg ( long  ) -> std::false_type
constexpr

◆ check_is_input_range() [1/3]

template<class T >
constexpr auto clipp::traits::check_is_input_range ( char  ) -> decltype( std::begin(std::declval<T>()), std::end(std::declval<T>()), std::true_type
constexpr

Definition at line 231 of file clipp.h.

◆ check_is_input_range() [2/3]

template<class T >
constexpr auto clipp::traits::check_is_input_range ( int  ) -> decltype( begin(std::declval<T>()), end(std::declval<T>()), std::true_type
constexpr

input range type trait

Definition at line 225 of file clipp.h.

◆ check_is_input_range() [3/3]

template<class >
constexpr auto clipp::traits::check_is_input_range ( long  ) -> std::false_type
constexpr

◆ check_is_void_callable() [1/2]

template<class Fn , class... Args>
constexpr auto clipp::traits::check_is_void_callable ( int  ) -> decltype( std::declval<Fn>()(std::declval<Args>()...), std::true_type
constexpr

Definition at line 173 of file clipp.h.

◆ check_is_void_callable() [2/2]

template<class , class , class... >
constexpr auto clipp::traits::check_is_void_callable ( long  ) -> std::false_type
constexpr

◆ check_is_void_callable_without_arg() [1/2]

template<class Fn >
constexpr auto clipp::traits::check_is_void_callable_without_arg ( int  ) -> decltype( std::declval<Fn>()(), std::true_type
constexpr

Definition at line 182 of file clipp.h.

◆ check_is_void_callable_without_arg() [2/2]

template<class >
constexpr auto clipp::traits::check_is_void_callable_without_arg ( long  ) -> std::false_type
constexpr