ZeroErr
Loading...
Searching...
No Matches
zeroerr::detail::StringLike< T > Struct Template Reference

#include <string.h>

Static Public Member Functions

template<class U >
static auto test (int) -> decltype(static_cast< const char * >(std::declval< const U & >().data()), static_cast< std::size_t >(std::declval< const U & >().size()), std::true_type{})
 
template<class >
static std::false_type test (...)
 
template<class U >
static auto own (int) -> decltype(std::declval< U & >().append(static_cast< const char * >(nullptr), std::size_t{}), std::true_type{})
 
template<class >
static std::false_type own (...)
 

Static Public Attributes

static constexpr bool value = decltype(test<T>(0))::value
 
static constexpr bool owning = value && decltype(own<T>(0))::value
 

Member Function Documentation

◆ own() [1/2]

template<class T >
template<class >
static std::false_type zeroerr::detail::StringLike< T >::own (   ...)
static

◆ own() [2/2]

template<class T >
template<class U >
static auto zeroerr::detail::StringLike< T >::own ( int  ) -> decltype(std::declval< U & >().append(static_cast< const char * >(nullptr), std::size_t{}), std::true_type{})
static

◆ test() [1/2]

template<class T >
template<class >
static std::false_type zeroerr::detail::StringLike< T >::test (   ...)
static

◆ test() [2/2]

template<class T >
template<class U >
static auto zeroerr::detail::StringLike< T >::test ( int  ) -> decltype(static_cast< const char * >(std::declval< const U & >().data()), static_cast< std::size_t >(std::declval< const U & >().size()), std::true_type{})
static

Member Data Documentation

◆ owning

template<class T >
constexpr bool zeroerr::detail::StringLike< T >::owning = value && decltype(own<T>(0))::value
staticconstexpr

◆ value

template<class T >
constexpr bool zeroerr::detail::StringLike< T >::value = decltype(test<T>(0))::value
staticconstexpr

The documentation for this struct was generated from the following file: