ZeroErr
zeroerr::detail Namespace Reference

Classes

class  XmlEncode
 
class  XmlWriter
 
struct  context_helper
 
struct  context_helper< T, true >
 
struct  context_helper< T, false >
 
struct  FunctionDecomposition
 FunctionDecomposition is a meta function to decompose the function type. The ValueType and numOfArgs will be the result of the decomposition. More...
 
struct  memfun_type
 
struct  memfun_type< Ret(Class::*)(Args...) const >
 
struct  always_false
 
struct  always_true
 
struct  seq
 
struct  gen_seq
 
struct  gen_seq< 0, Is... >
 
struct  is_specialization
 
struct  is_specialization< Ref< Args... >, Ref >
 
struct  is_streamable
 
struct  is_streamable< S, T, has_stream_operator< S, T > >
 
struct  is_container
 
struct  is_container< T, has_begin_end< T > >
 
struct  is_associative_container
 
struct  is_associative_container< T, has_begin_end_find_insert< T > >
 
struct  is_string
 
struct  is_array
 
struct  is_array< T, void_t< decltype(std::declval< T >()[0])> >
 
struct  ele_type_is_pair
 
struct  ele_type_is_pair< T, has_pair_type< T > >
 
struct  to_store_type
 
struct  to_store_type< const char * >
 
struct  to_store_type< const char(&)[]>
 
struct  to_store_type< T &, is_not_array< T > >
 
struct  to_store_type< T && >
 
struct  visit_impl
 
struct  visit_impl< 0 >
 
struct  visit2_impl
 
struct  visit2_impl< 0 >
 
struct  has_extension
 has_extension is a type trait to check if user defined PrinterExt for a type More...
 
struct  has_extension< T, has_printer_ext< T > >
 
struct  regTest
 regTest is a class that is used to register the test case. It will be used as global variables and the constructor will be called to register the test case. More...
 
struct  regReporter
 regReporter is a class that is used to register the reporter. It will be used as global variables and the constructor will be called to register the reporter. More...
 

Typedefs

using uchar = unsigned char
 
template<typename T >
using FunctionDecompositionT = decltype(FunctionDecompositionImpl(std::declval< T >()))
 
template<typename... Ts>
using void_t = void
 
template<typename S , typename T >
using has_stream_operator = void_t< decltype(std::declval< S & >()<< std::declval< T >())>
 
template<typename T >
using has_begin_end = void_t< decltype(std::declval< T >().begin()), decltype(std::declval< T >().end())>
 
template<typename T >
using has_begin_end_find_insert = void_t< decltype(std::declval< T >().begin()), decltype(std::declval< T >().end()), decltype(std::declval< T >().find(std::declval< typename T::key_type >())), decltype(std::declval< T >().insert(std::declval< typename T::value_type >()))>
 
template<typename T >
using has_pair_type = void_t< typename T::value_type, decltype(std::declval< typename T::value_type >().first), decltype(std::declval< typename T::value_type >().second)>
 
template<typename T >
using is_not_array = typename std::enable_if<!std::is_array< T >::value >::type
 
template<typename T >
using to_store_type_t = typename to_store_type< T >::type
 
template<typename T >
using has_printer_ext = void_t< decltype(zeroerr::PrinterExt(std::declval< zeroerr::Printer & >(), std::declval< T & >(), 0, nullptr, zeroerr::rank< zeroerr::max_rank >()))>
 

Functions

std::set< TestCase > & getTestSet (TestType type)
 
std::ostream & operator<< (std::ostream &os, const XmlEncode &xmlEncode)
 
template<typename T >
void doNotOptimizeAway (T const &val)
 
template<typename T >
void doNotOptimizeAway (T &val)
 
template<typename... Args>
FunctionDecomposition< typename std::decay< Args >::type... > FunctionDecompositionImpl (void(*)(Args...))
 
template<typename... Args>
FunctionDecomposition< typename std::decay< Args >::type... > FunctionDecompositionImpl (std::function< void(Args...)>)
 
template<typename F >
memfun_type< decltype(&F::operator())>::ret_type FunctionDecompositionImpl (F)
 
template<typename F , typename... Ts>
void visit_at (const std::tuple< Ts... > &tup, size_t idx, F &&fun)
 
template<typename F , typename... Ts>
void visit_at (std::tuple< Ts... > &tup, size_t idx, F &&fun)
 
template<typename F , typename... Ts, typename... T2s>
void visit2_at (const std::tuple< Ts... > &tup1, const std::tuple< T2s... > &tup2, size_t idx, F &&fun)
 
template<typename F , typename... Ts, typename... T2s>
void visit2_at (std::tuple< Ts... > &tup1, std::tuple< T2s... > &tup2, size_t idx, F &&fun)
 
template<typename F , typename... Ts, typename... T2s>
void visit2_at (const std::tuple< Ts... > &tup1, std::tuple< T2s... > &tup2, size_t idx, F &&fun)
 
template<typename F , typename... Ts, typename... T2s>
void visit2_at (std::tuple< Ts... > &tup1, const std::tuple< T2s... > &tup2, size_t idx, F &&fun)
 
template<typename T , unsigned... I>
std::string gen_str (const char *msg, const T &args, seq< I... >)
 
template<typename T >
std::string gen_str (const char *msg, const T &, seq<>)
 

Typedef Documentation

◆ FunctionDecompositionT

template<typename T >
using zeroerr::detail::FunctionDecompositionT = typedef decltype(FunctionDecompositionImpl(std::declval<T>()))

◆ has_begin_end

template<typename T >
using zeroerr::detail::has_begin_end = typedef void_t<decltype(std::declval<T>().begin()), decltype(std::declval<T>().end())>

◆ has_begin_end_find_insert

template<typename T >
using zeroerr::detail::has_begin_end_find_insert = typedef void_t<decltype(std::declval<T>().begin()), decltype(std::declval<T>().end()), decltype(std::declval<T>().find(std::declval<typename T::key_type>())), decltype(std::declval<T>().insert(std::declval<typename T::value_type>()))>

◆ has_pair_type

template<typename T >
using zeroerr::detail::has_pair_type = typedef void_t<typename T::value_type, decltype(std::declval<typename T::value_type>().first), decltype(std::declval<typename T::value_type>().second)>

◆ has_printer_ext

template<typename T >
using zeroerr::detail::has_printer_ext = typedef void_t<decltype(zeroerr::PrinterExt(std::declval<zeroerr::Printer&>(), std::declval<T&>(), 0, nullptr, zeroerr::rank<zeroerr::max_rank>()))>

◆ has_stream_operator

template<typename S , typename T >
using zeroerr::detail::has_stream_operator = typedef void_t<decltype(std::declval<S&>() << std::declval<T>())>

◆ is_not_array

template<typename T >
using zeroerr::detail::is_not_array = typedef typename std::enable_if<!std::is_array<T>::value>::type

◆ to_store_type_t

template<typename T >
using zeroerr::detail::to_store_type_t = typedef typename to_store_type<T>::type

◆ uchar

using zeroerr::detail::uchar = typedef unsigned char

◆ void_t

template<typename... Ts>
using zeroerr::detail::void_t = typedef void

Function Documentation

◆ doNotOptimizeAway() [1/2]

template<typename T >
void zeroerr::detail::doNotOptimizeAway ( T &  val)

◆ doNotOptimizeAway() [2/2]

template<typename T >
void zeroerr::detail::doNotOptimizeAway ( T const &  val)

◆ FunctionDecompositionImpl() [1/3]

template<typename F >
memfun_type<decltype(&F::operator())>::ret_type zeroerr::detail::FunctionDecompositionImpl ( )

◆ FunctionDecompositionImpl() [2/3]

template<typename... Args>
FunctionDecomposition<typename std::decay<Args>::type...> zeroerr::detail::FunctionDecompositionImpl ( std::function< void(Args...)>  )

◆ FunctionDecompositionImpl() [3/3]

template<typename... Args>
FunctionDecomposition<typename std::decay<Args>::type...> zeroerr::detail::FunctionDecompositionImpl ( void(*)(Args...)  )

◆ gen_str() [1/2]

template<typename T >
std::string zeroerr::detail::gen_str ( const char *  msg,
const T &  ,
seq<>   
)

◆ gen_str() [2/2]

template<typename T , unsigned... I>
std::string zeroerr::detail::gen_str ( const char *  msg,
const T &  args,
seq< I... >   
)

◆ getTestSet()

std::set<TestCase>& zeroerr::detail::getTestSet ( TestType  type)

◆ operator<<()

std::ostream& zeroerr::detail::operator<< ( std::ostream &  os,
const XmlEncode xmlEncode 
)

◆ visit2_at() [1/4]

template<typename F , typename... Ts, typename... T2s>
void zeroerr::detail::visit2_at ( const std::tuple< Ts... > &  tup1,
const std::tuple< T2s... > &  tup2,
size_t  idx,
F &&  fun 
)

◆ visit2_at() [2/4]

template<typename F , typename... Ts, typename... T2s>
void zeroerr::detail::visit2_at ( const std::tuple< Ts... > &  tup1,
std::tuple< T2s... > &  tup2,
size_t  idx,
F &&  fun 
)

◆ visit2_at() [3/4]

template<typename F , typename... Ts, typename... T2s>
void zeroerr::detail::visit2_at ( std::tuple< Ts... > &  tup1,
const std::tuple< T2s... > &  tup2,
size_t  idx,
F &&  fun 
)

◆ visit2_at() [4/4]

template<typename F , typename... Ts, typename... T2s>
void zeroerr::detail::visit2_at ( std::tuple< Ts... > &  tup1,
std::tuple< T2s... > &  tup2,
size_t  idx,
F &&  fun 
)

◆ visit_at() [1/2]

template<typename F , typename... Ts>
void zeroerr::detail::visit_at ( const std::tuple< Ts... > &  tup,
size_t  idx,
F &&  fun 
)

◆ visit_at() [2/2]

template<typename F , typename... Ts>
void zeroerr::detail::visit_at ( std::tuple< Ts... > &  tup,
size_t  idx,
F &&  fun 
)