Jamba C++ API  5.1.1
Metaprogramming.h File Reference
#include <type_traits>
#include <sstream>
#include <ostream>
#include "Cpp17.h"

Go to the source code of this file.

Classes

class  Cast< U >
 dynamic_cast<U *>(x) does not compile if x is not polymorphic. More...
 

Namespaces

 pongasoft
 
 pongasoft::Utils
 

Typedefs

template<typename T >
using operator_not_eq_t = decltype(std::declval< T const & >() !=std::declval< T const & >())
 Defines the type for operator!= More...
 
template<typename T >
using operator_write_to_ostream_t = decltype(std::declval< std::ostream & >()<< std::declval< T const & >())
 Defines the type for operator<< More...
 
template<typename From , typename To >
using static_cast_t = decltype(static_cast< To >(std::declval< From >()))
 Defines the type for static_cast<To>(From) More...
 

Functions

template<typename T >
std::string typeString ()
 typeid(T).name() does not account for const or reference. More...
 

Variables

template<typename T >
constexpr auto is_operator_not_eq_defined = cpp17::experimental::is_detected_v<operator_not_eq_t, T>
 Allows to detect whether a type defines operator!= at compile time. More...
 
template<typename T >
constexpr auto is_operator_write_to_ostream_defined = cpp17::experimental::is_detected_v<operator_write_to_ostream_t, T>
 Allows to detect whether a type defines ostream << x at compile time. More...
 
template<typename From , typename To >
constexpr auto is_static_cast_defined = cpp17::experimental::is_detected_v<static_cast_t, From, To>
 Allows to detect (at compilation time) whether the call static_cast<To>(from) (where from is of type From) will compile. More...