MADNESS 0.10.1
Classes | Namespaces | Macros | Typedefs | Functions | Variables
type_traits.h File Reference
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <iosfwd>
#include <madness/world/meta.h>
Include dependency graph for type_traits.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  madness::operators::__x
 
struct  madness::add_future< T >
 maps type T to Future<T>. More...
 
struct  madness::add_future< Future< T > >
 maps Future<T> to Future<T>. More...
 
struct  madness::future_to_ref< T >
 
struct  madness::future_to_ref< const Future< T > & >
 
struct  madness::future_to_ref< Future< T > & >
 
struct  madness::future_to_ref< Future< T > * >
 
struct  madness::future_to_ref< Future< T > >
 
struct  madness::is_istreammable_ns::impl< T >
 
struct  madness::is_ostreammable_ns::impl< T >
 
struct  madness::is_any_function_pointer< T, Enabler >
 is true type if T is a pointer to free or member function More...
 
struct  madness::is_any_function_pointer< T, std::enable_if_t< std::is_member_function_pointer< T >::value||is_function_pointer_v< T > > >
 
struct  madness::is_archive< archive::BinaryFstreamInputArchive >
 
struct  madness::is_archive< archive::BinaryFstreamOutputArchive >
 
struct  madness::is_archive< archive::BufferInputArchive >
 
struct  madness::is_archive< archive::BufferOutputArchive >
 
struct  madness::is_archive< archive::ContainerRecordInputArchive >
 
struct  madness::is_archive< archive::ContainerRecordOutputArchive >
 
struct  madness::is_archive< archive::MPIInputArchive >
 
struct  madness::is_archive< archive::MPIOutputArchive >
 
struct  madness::is_archive< archive::MPIRawInputArchive >
 
struct  madness::is_archive< archive::MPIRawOutputArchive >
 
struct  madness::is_archive< archive::ParallelInputArchive< localarchiveT > >
 
struct  madness::is_archive< archive::ParallelOutputArchive< localarchiveT > >
 
struct  madness::is_archive< archive::TextFstreamInputArchive >
 
struct  madness::is_archive< archive::TextFstreamOutputArchive >
 
struct  madness::is_archive< archive::VectorInputArchive >
 
struct  madness::is_archive< archive::VectorOutputArchive >
 
struct  madness::is_default_serializable< Archive, T >
 is std::true_type if T can be serialized to Archive without specialized serialize() method More...
 
struct  madness::is_default_serializable_helper< Archive, T, Enabler >
 
struct  madness::is_default_serializable_helper< Archive, archive::archive_array< T >, std::enable_if_t< is_default_serializable_helper< Archive, T >::value > >
 
struct  madness::is_default_serializable_helper< archive::BinaryFstreamInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::BinaryFstreamOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::BufferInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::BufferOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::ContainerRecordInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::ContainerRecordOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::MPIInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::MPIOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::MPIRawInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::MPIRawOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::ParallelInputArchive< localarchiveT >, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::ParallelOutputArchive< localarchiveT >, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::TextFstreamInputArchive, T, std::enable_if_t< is_iostreammable_v< T >||is_any_function_pointer_v< T > > >
 
struct  madness::is_default_serializable_helper< archive::TextFstreamOutputArchive, T, std::enable_if_t< is_iostreammable_v< T >||std::is_function_v< T >||is_any_function_pointer_v< T > > >
 
struct  madness::is_default_serializable_helper< archive::VectorInputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_default_serializable_helper< archive::VectorOutputArchive, T, std::enable_if_t< is_trivially_serializable< T >::value > >
 
struct  madness::is_function_pointer< T, Enabler >
 is true type if T is a pointer to a free function More...
 
struct  madness::is_function_pointer< T, std::enable_if_t< std::is_function< typename std::remove_pointer< T >::type >::value > >
 
struct  madness::is_future< T >
 test if a type is a future. More...
 
struct  madness::is_future< Future< T > >
 
struct  madness::is_input_archive< archive::BinaryFstreamInputArchive >
 
struct  madness::is_input_archive< archive::BufferInputArchive >
 
struct  madness::is_input_archive< archive::ContainerRecordInputArchive >
 
struct  madness::is_input_archive< archive::MPIInputArchive >
 
struct  madness::is_input_archive< archive::MPIRawInputArchive >
 
struct  madness::is_input_archive< archive::ParallelInputArchive< localarchiveT > >
 
struct  madness::is_input_archive< archive::TextFstreamInputArchive >
 
struct  madness::is_input_archive< archive::VectorInputArchive >
 
struct  madness::is_istreammable< T >
 
struct  madness::is_ostreammable< T >
 
struct  madness::is_output_archive< archive::BinaryFstreamOutputArchive >
 
struct  madness::is_output_archive< archive::BufferOutputArchive >
 
struct  madness::is_output_archive< archive::ContainerRecordOutputArchive >
 
struct  madness::is_output_archive< archive::MPIOutputArchive >
 
struct  madness::is_output_archive< archive::MPIRawOutputArchive >
 
struct  madness::is_output_archive< archive::ParallelOutputArchive< localarchiveT > >
 
struct  madness::is_output_archive< archive::TextFstreamOutputArchive >
 
struct  madness::is_output_archive< archive::VectorOutputArchive >
 
struct  madness::is_serializable< Archive, T >
 
struct  madness::is_text_archive< Archive, Enabler >
 This trait types tests if Archive is a text archive. More...
 
struct  madness::is_text_archive< archive::TextFstreamInputArchive >
 
struct  madness::is_text_archive< archive::TextFstreamOutputArchive >
 
struct  madness::is_trivially_copyable< T >
 trait for trivial (=bitwise) copyability of T, defaults to std::is_trivially_copyable<T> but can be specialized as needed More...
 
struct  madness::is_trivially_serializable< T >
 
struct  madness::remove_fcvr< T >
 
struct  madness::remove_future< T >
 maps Future<T> to T. More...
 
struct  madness::remove_future< const Future< T > & >
 
struct  madness::remove_future< const Future< T > >
 
struct  madness::remove_future< Future< T > & >
 
struct  madness::remove_future< Future< T > && >
 
struct  madness::remove_future< Future< T > >
 This metafunction maps Future<T> to T. More...
 

Namespaces

namespace  madness
 Namespace for all elements and tools of MADNESS.
 
namespace  madness::archive
 Namespace for I/O tools.
 
namespace  madness::is_istreammable_ns
 
namespace  madness::is_ostreammable_ns
 
namespace  madness::operators
 

Macros

#define MEMFUN_RETURNT(MEMFUN)   typename madness::detail::memfunc_traits< MEMFUN >::result_type
 Macro to make member function type traits easier to use.
 
#define REMCONST(TYPE)   typename std::remove_const< TYPE >::type
 Macro to make remove_const<T> easier to use.
 
#define REMFUTURE(T)   typename remove_future< T >::type
 Macro to determine type of future (by removing wrapping Future template).
 

Typedefs

template<typename T >
using madness::future_to_ref_t = typename future_to_ref< T >::type
 
template<typename T , typename Archive >
using madness::has_freestanding_default_serialize_t = decltype(default_serialize(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive , typename = std::enable_if_t<std::is_pointer_v<T>>>
using madness::has_freestanding_default_serialize_with_size_t = decltype(default_serialize(std::declval< Archive & >(), std::declval< const T & >(), 1u))
 
template<typename T , typename Archive >
using madness::has_freestanding_serialize_t = decltype(serialize(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive , typename = std::enable_if_t<std::is_pointer_v<T>>>
using madness::has_freestanding_serialize_with_size_t = decltype(serialize(std::declval< Archive & >(), std::declval< T & >(), 1u))
 
template<typename T , typename Archive , typename = std::enable_if_t<!std::is_pointer_v<T>>>
using madness::has_freestanding_serialize_with_version_t = decltype(serialize(std::declval< Archive & >(), std::declval< T & >(), 0u))
 
template<typename T , typename Archive >
using madness::has_member_serialize_t = decltype(std::declval< T & >().serialize(std::declval< Archive & >()))
 
template<typename T , typename Archive >
using madness::has_member_serialize_with_version_t = decltype(std::declval< T & >().serialize(std::declval< Archive & >(), 0u))
 
template<typename T , typename Archive >
using madness::has_nonmember_load_t = decltype(madness::archive::ArchiveLoadImpl< Archive, T >::load(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using madness::has_nonmember_serialize_t = decltype(madness::archive::ArchiveSerializeImpl< Archive, T >::serialize(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using madness::has_nonmember_store_t = decltype(madness::archive::ArchiveStoreImpl< Archive, T >::store(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using madness::has_nonmember_wrap_load_t = decltype(madness::archive::ArchiveImpl< Archive, T >::wrap_load(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T , typename Archive >
using madness::has_nonmember_wrap_store_t = decltype(madness::archive::ArchiveImpl< Archive, T >::wrap_store(std::declval< Archive & >(), std::declval< T & >()))
 
template<typename T >
using madness::is_archive_defined_t = typename is_archive< std::remove_reference_t< std::remove_cv_t< T > > >::type
 
template<typename T >
using madness::is_input_archive_defined_t = typename is_input_archive< std::remove_reference_t< std::remove_cv_t< T > > >::type
 
template<typename T >
using madness::is_output_archive_defined_t = typename is_output_archive< std::remove_reference_t< std::remove_cv_t< T > > >::type
 
template<typename To , typename From >
using madness::is_ostreammable_ns::left_shift = decltype(std::declval< To >()<< std::declval< From >())
 
template<typename To , typename From >
using madness::is_ostreammable_ns::left_shift_in_ns_madness_operators = decltype(madness::operators::operator<<(std::declval< To >(), std::declval< From >()))
 
template<typename T >
using madness::remove_fcvr_t = typename remove_fcvr< T >::type
 
template<typename T >
using madness::remove_future_t = typename remove_future< T >::type
 C++11 version of REMFUTURE.
 
template<typename From , typename To >
using madness::is_istreammable_ns::right_shift = decltype(std::declval< From >() > > std::declval< To >())
 
template<typename From , typename To >
using madness::is_istreammable_ns::right_shift_in_ns_madness_operators = decltype(madness::operators::operator<<(std::declval< From >(), std::declval< To >()))
 

Functions

std::ostream & madness::operators::operator<< (std::ostream &, const __x &)
 
std::ostream & madness::operators::operator>> (std::ostream &, __x &)
 

Variables

template<typename T , typename Archive >
constexpr bool madness::has_freestanding_default_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_freestanding_default_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_default_serialize_with_size_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_freestanding_serialize_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_freestanding_serialize_with_size_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_size_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_freestanding_serialize_with_version_v = madness::meta::is_detected_v<madness::has_freestanding_serialize_with_version_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_member_serialize_v = madness::meta::is_detected_v<madness::has_member_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_member_serialize_with_version_v = madness::meta::is_detected_v<madness::has_member_serialize_with_version_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_load_and_store_v = has_nonmember_load_v<T, Archive> && has_nonmember_store_v<T, Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_load_v = madness::meta::is_detected_v<madness::has_nonmember_load_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_serialize_v = madness::meta::is_detected_v<madness::has_nonmember_serialize_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_store_v = madness::meta::is_detected_v<madness::has_nonmember_store_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_wrap_load_and_store_v = has_nonmember_wrap_load_v<T, Archive> && has_nonmember_wrap_store_v<T, Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_wrap_load_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_load_t,T,Archive>
 
template<typename T , typename Archive >
constexpr bool madness::has_nonmember_wrap_store_v = madness::meta::is_detected_v<madness::has_nonmember_wrap_store_t,T,Archive>
 
template<typename T >
constexpr bool madness::is_always_serializable
 
template<typename T >
constexpr bool madness::is_any_function_pointer_v = is_any_function_pointer<T>::value
 
template<typename T >
constexpr bool madness::is_archive_v = meta::is_detected_v<is_archive_defined_t,T>
 
template<typename Archive , typename T >
constexpr bool madness::is_default_serializable_v = is_default_serializable<Archive, T>::value
 
template<typename Archive , typename T >
constexpr bool madness::is_default_serializable_v< Archive, const T > = is_default_serializable_v<Archive, T>
 
template<typename T >
constexpr bool madness::is_function_pointer_v = is_function_pointer<T>::value
 
template<typename T >
constexpr bool madness::is_input_archive_v = meta::is_detected_v<is_input_archive_defined_t, T>
 
template<typename T >
constexpr bool madness::is_iostreammable_v = is_istreammable_v<T> && is_ostreammable_v<T>
 providing automatic support for serializing to/from std streams requires bidirectional streammability
 
template<typename T >
constexpr bool madness::is_istreammable_v = is_istreammable<T>::value
 Shortcut for is_istreammable<T>::value.
 
template<typename T >
constexpr bool madness::is_ostreammable_v = is_ostreammable<T>::value
 Shortcut for is_ostreammable<T>::value.
 
template<typename T >
constexpr bool madness::is_output_archive_v = meta::is_detected_v<is_output_archive_defined_t, T>
 
template<typename Archive , typename T >
constexpr bool madness::is_serializable_v
 
template<typename Archive , typename T >
constexpr bool madness::is_serializable_v< Archive, const T > = is_serializable_v<Archive, T>
 
template<typename Archive >
constexpr const bool madness::is_text_archive_v = is_text_archive<Archive>::value
 is_text_archive_v is a shorthand for is_text_archive<A>::value
 
template<typename T >
constexpr bool madness::is_trivially_copyable_v = is_trivially_copyable<T>::value
 
template<typename T >
constexpr bool madness::is_trivially_serializable_v = is_trivially_serializable<T>::value
 
template<typename Archive , typename T >
constexpr bool madness::is_user_serializable_v
 
template<typename Archive , typename T >
constexpr bool madness::is_user_serializable_v< Archive, const T > = is_user_serializable_v<Archive, T>
 

Macro Definition Documentation

◆ MEMFUN_RETURNT

#define MEMFUN_RETURNT (   MEMFUN)    typename madness::detail::memfunc_traits< MEMFUN >::result_type

Macro to make member function type traits easier to use.

◆ REMCONST

#define REMCONST (   TYPE)    typename std::remove_const< TYPE >::type

Macro to make remove_const<T> easier to use.

◆ REMFUTURE

#define REMFUTURE (   T)    typename remove_future< T >::type

Macro to determine type of future (by removing wrapping Future template).

Parameters
TThe type (possibly with Future).