36 #ifndef MADNESS_WORLD_TYPESTUFF_H__INCLUDED
37 #define MADNESS_WORLD_TYPESTUFF_H__INCLUDED
59 template <
class A,
class B>
65 static const bool value = (
sizeof(
f((A*)0)) ==
sizeof(yes));
72 template <
typename>
class Future;
89 template <
class T,
typename resultT>
116 template <
class T,
typename resultT>
120 resultT(
T::*op_)()
const;
133 void (
T::*op_)()
const;
142 template <
class T,
typename resultT>
148 template <
class T,
typename resultT>
160 template <
typename T>
181 template <
typename T>
188 template <
typename C>
189 static yes&
test(
typename C::result_type*);
192 static no&
test(...);
196 static const bool value =
sizeof(test<T>(0)) ==
sizeof(
yes);
256 #define REMREF(TYPE) typename std::remove_reference< TYPE >::type
257 #define REMCONST(TYPE) typename std::remove_const< TYPE >::type
258 #define REMCONSTX(TYPE) std::remove_const< TYPE >::type
259 #define RETURN_WRAPPERT(TYPE) typename madness::ReturnWrapper< TYPE >::type
261 #define MEMFUN_RETURNT(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::result_type
262 #define MEMFUN_CONSTNESS(MEMFUN) madness::detail::memfunc_traits< MEMFUN >::constness
263 #define MEMFUN_OBJT(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::obj_type
264 #define MEMFUN_ARITY(MEMFUN) madness::detail::memfunc_traits< MEMFUN >::arity
265 #define MEMFUN_ARG1T(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::arg1_type
266 #define MEMFUN_ARG2T(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::arg2_type
267 #define MEMFUN_ARG3T(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::arg3_type
268 #define MEMFUN_ARG4T(MEMFUN) typename madness::detail::memfunc_traits< MEMFUN >::arg4_type
270 #define FUNCTION_RETURNT(FUNCTION) typename madness::detail::function_traits< FUNCTION >::result_type
271 #define FUNCTION_ARITY(FUNCTION) madness::detail::function_traits< FUNCTION >::arity
272 #define FUNCTION_ARG1T(FUNCTION) typename madness::detail::function_traits< FUNCTION >::arg1_type
273 #define FUNCTION_ARG2T(FUNCTION) typename madness::detail::function_traits< FUNCTION >::arg2_type
274 #define FUNCTION_ARG3T(FUNCTION) typename madness::detail::function_traits< FUNCTION >::arg3_type
275 #define FUNCTION_ARG4T(FUNCTION) typename madness::detail::function_traits< FUNCTION >::arg4_type
277 #define RESULT_OF(FUNCTION) typename madness::detail::result_of< FUNCTION >::type
279 #define IS_SAME(A, B) std::is_same< A, B >
280 #define IS_EQ(A, B) std::is_eq< A, B >
283 #endif // MADNESS_WORLD_TYPESTUFF_H__INCLUDED
Tensor< double > B
Definition: tdse1d.cc:167
Boost-type-trait-like mapping of Future to T.
Definition: typestuff.h:73
This defines stuff that is serialiable by default rules ... basically anything contiguous.
Definition: typestuff.h:84
Simple binder for const member functions with no arguments.
Definition: typestuff.h:117
T & operator*() const
Definition: typestuff.h:177
resultT operator()()
Definition: typestuff.h:96
T type
Definition: type_traits_bits.h:244
BindNullaryMemFun(T *t, resultT(T::*op)())
Definition: typestuff.h:95
static yes & test(typename C::result_type *)
Reference(T *x)
Definition: typestuff.h:176
Void type
Definition: typestuff.h:168
char yes[1]
Definition: typestuff.h:185
remove_future< typename std::remove_cv< typename std::remove_reference< T >::type >::type >::type type
Definition: typestuff.h:79
Definition: typestuff.h:182
is_fundamental::value will be true if T is a fundamental type
Definition: type_traits_bits.h:110
int no
Definition: typestuff.h:62
bool_constant< false > false_type
Definition: gtest-port.h:1617
BindNullaryMemFun< T, resultT > bind_nullary_mem_fun(T *t, resultT(T::*op)())
Factory function for BindNullaryMemFun.
Definition: typestuff.h:143
Used to provide rvalue references to support move semantics.
Definition: typestuff.h:173
void operator()()
Definition: typestuff.h:109
Wrapper so that can return something even if returning void.
Definition: typestuff.h:161
const T1 &f1 return GTEST_2_TUPLE_() T(f0, f1)
BindNullaryMemFun(T *t, void(T::*op)())
Definition: typestuff.h:108
Simple binder for member functions with no arguments.
Definition: typestuff.h:90
T type
Definition: typestuff.h:162
Definition: typestuff.h:77
static const bool value
Definition: typestuff.h:85
void operator()() const
Definition: typestuff.h:136
A future is a possibly yet unevaluated value.
Definition: ref.h:210
A type you can return when you want to return void ... use "return None".
Definition: typestuff.h:154
True if A is derived from B and is not B.
Definition: typestuff.h:60
Tensor< double > op(const Tensor< double > &x)
Definition: kain.cc:508
remove_cv::type or remove_cv::type will be T
Definition: type_traits_bits.h:221
is_function::value is true if T is a function pointer
Definition: type_traits_bits.h:85
BindNullaryConstMemFun(const T *t, void(T::*op)() const)
Definition: typestuff.h:135
static const bool value
Definition: typestuff.h:65
resultT operator()() const
Definition: typestuff.h:123
Holds machinery to set up Functions/FuncImpls using various Factories and Interfaces.
Definition: chem/atomutil.cc:45
char yes
Definition: typestuff.h:61
BindNullaryConstMemFun(const T *t, resultT(T::*op)() const)
Definition: typestuff.h:122
is_member_function_pointer::value is true if T is a member function pointer
Definition: type_traits_bits.h:91
T * operator->() const
Definition: typestuff.h:178