1 #ifndef CLHEP_TYPE_TRAITS_H
2 #define CLHEP_TYPE_TRAITS_H
17 #if defined(__GXX_EXPERIMENTAL_CXX0X__)
18 # define CLHEP_HAS_RVALUE_REFERENCE
20 # define CLHEP_NO_RVALUE_REFERENCE
63 template<
typename T >
struct is_trivial;
64 template<
typename T >
struct is_trivially_copyable;
65 template<
typename T >
struct is_standard_layout;
66 template<
typename T >
struct is_pod;
67 template<
typename T >
struct is_literal_type;
68 template<
typename T >
struct is_empty;
69 template<
typename T >
struct is_polymorphic;
73 template<
typename T,
typename... Args >
struct is_constructible;
74 template<
typename T,
typename... Args >
struct is_nothrow_constructible;
75 template<
typename T >
struct has_default_constructor;
76 template<
typename T >
struct has_copy_constructor;
77 template<
typename T >
struct has_copy_assign;
78 template<
typename T >
struct has_move_constructor;
79 template<
typename T >
struct has_move_assign;
80 template<
typename T >
struct has_trivial_default_constructor;
81 template<
typename T >
struct has_trivial_copy_constructor;
82 template<
typename T >
struct has_trivial_move_constructor;
83 template<
typename T >
struct has_trivial_copy_assign;
84 template<
typename T >
struct has_trivial_move_assign;
85 template<
typename T >
struct has_trivial_destructor;
86 template<
typename T >
struct has_nothrow_default_constructor;
87 template<
typename T >
struct has_nothrow_copy_constructor;
88 template<
typename T >
struct has_nothrow_move_constructor;
89 template<
typename T >
struct has_nothrow_copy_assign;
90 template<
typename T >
struct has_nothrow_move_assign;
91 template<
typename T >
struct has_virtual_destructor;
96 template<
typename T >
struct alignment_of;
98 template<
typename T >
struct rank;
99 template<
typename T,
unsigned I = 0 >
struct extent;
102 template<
typename T,
typename U >
struct is_same;
104 template<
typename Base,
typename Derived >
struct is_base_of;
108 template<
typename From,
typename To >
struct is_explicitly_convertible;
126 template<
typename T >
struct make_signed;
127 template<
typename T >
struct make_unsigned;
140 template< std::
size_t Len, std::
size_t Align >
struct aligned_storage;
141 template< std::size_t
Len,
typename... Types >
struct aligned_union;
142 template<
typename T >
struct decay;
147 template<
typename... T >
struct common_type;
148 template<
typename T >
struct underlying_type;
149 template<
typename >
typename result_of;
150 template<
typename F,
typename... ArgTypes >
typename result_of<F(ArgTypes...)>;
164 template<
typename T, T v >
216 template<
typename U >
218 template<
typename U >
226 template<
typename T >
237 template<
typename T >
239 template<
typename T >
241 template<
typename T >
245 template<
typename T >
248 template<
typename T >
251 template<
typename T >
254 template<
typename T >
257 template<
typename T,
unsigned N >
260 template<
typename T,
unsigned N >
263 template<
typename T,
unsigned N >
266 template<
typename T,
unsigned N >
319 template<
typename T,
typename C >
322 template<
typename T,
typename C >
325 template<
typename T,
typename C >
328 template<
typename T,
typename C >
331 template<
typename T,
typename C
335 template<
typename T,
typename C
339 template<
typename T,
typename C
343 template<
typename T,
typename C
347 template<
typename T,
typename C
348 ,
typename A1,
typename A2 >
351 template<
typename T,
typename C
352 ,
typename A1,
typename A2 >
355 template<
typename T,
typename C
356 ,
typename A1,
typename A2 >
359 template<
typename T,
typename C
360 ,
typename A1,
typename A2 >
363 template<
typename T,
typename C
364 ,
typename A1,
typename A2,
typename A3 >
367 template<
typename T,
typename C
368 ,
typename A1,
typename A2,
typename A3 >
371 template<
typename T,
typename C
372 ,
typename A1,
typename A2,
typename A3 >
373 struct encode<T (C::*)(A1,A2,A3) volatile>
375 template<
typename T,
typename C
376 ,
typename A1,
typename A2,
typename A3 >
379 template<
typename T,
typename C
380 ,
typename A1,
typename A2,
typename A3,
typename A4 >
383 template<
typename T,
typename C
384 ,
typename A1,
typename A2,
typename A3,
typename A4 >
387 template<
typename T,
typename C
388 ,
typename A1,
typename A2,
typename A3,
typename A4 >
389 struct encode<T (C::*)(A1,A2,A3,A4) volatile>
391 template<
typename T,
typename C
392 ,
typename A1,
typename A2,
typename A3,
typename A4 >
395 template<
typename T,
typename C
396 ,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5 >
399 template<
typename T,
typename C
400 ,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5 >
403 template<
typename T,
typename C
404 ,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5 >
405 struct encode<T (C::*)(A1,A2,A3,A4,A5) volatile>
407 template<
typename T,
typename C
408 ,
typename A1,
typename A2,
typename A3,
typename A4,
typename A5 >
413 template<
typename T,
typename C >
418 template<
typename T >
423 template<
typename T >
428 #if defined(CLHEP_HAS_RVALUE_REFERENCE)
429 template<
typename T >
432 #endif // CLHEP_HAS_RVALUE_REFERENCE
440 template<
typename T,
unsigned int p >
450 template<
typename T >
459 template<
typename T >
461 :
public tt::primary<T, tt::_integral > { };
468 template<
typename T >
469 struct is_floating_point
470 :
public tt::primary<T, tt::_floating_point > { };
476 template<
typename T >
478 :
public tt::primary<T, tt::_array > { };
485 template<
typename T >
487 :
public tt::primary<T, tt::_pointer > { };
494 template<
typename T >
495 struct is_lvalue_reference
496 :
public tt::primary<T, tt::_lvalue_reference > { };
503 template<
typename T >
struct is_rvalue_reference
504 :
public tt::primary<T, tt::_rvalue_reference > { };
511 template<
typename T >
struct is_member_object_pointer
512 :
public conditional< is_member_function_pointer<T>::value
514 , tt::primary<T, tt::_member_object_pointer>
523 template<
typename T >
524 struct is_member_function_pointer
525 :
public tt::primary<T, tt::_member_function_pointer > { };
532 template<
typename T >
534 :
public tt::primary<T, tt::_enum > { };
541 template<
typename T >
543 :
public tt::primary<T, tt::_union > { };
550 template<
typename T >
552 :
public tt::primary<T, tt::_class > { };
559 template<
typename T >
561 :
public tt::primary<T, tt::_function > { };
568 template<
typename T >
570 :
public tt::primary< T, tt::_lvalue_reference
571 | tt::_rvalue_reference
580 template<
typename T >
582 :
public tt::primary< T, tt::_integral
583 | tt::_floating_point
592 template<
typename T >
593 struct is_fundamental
594 :
public tt::primary< T, tt::_integral
595 | tt::_floating_point
605 template<
typename T >
607 :
public tt::primary< T, tt::_array
610 | tt::_floating_point
612 | tt::_member_object_pointer
613 | tt::_member_function_pointer
624 template<
typename T >
626 :
public tt::primary< T, tt::_integral
627 | tt::_floating_point
630 | tt::_member_object_pointer
631 | tt::_member_function_pointer
640 template<
typename T >
642 :
public tt::primary< T, tt::_array
644 | tt::_lvalue_reference
645 | tt::_rvalue_reference
646 | tt::_member_object_pointer
647 | tt::_member_function_pointer
660 template<
typename T >
661 struct is_member_pointer
662 :
public tt::primary< T, tt::_member_object_pointer
663 | tt::_member_function_pointer
674 template<
typename T >
677 static bool const is_c =
false;
678 static bool const is_v =
false;
687 template<
typename T >
691 static bool const is_v =
false;
700 template<
typename T >
701 struct cv<T volatile>
703 static bool const is_c =
false;
713 template<
typename T >
726 template<
typename T >
729 static bool const is_c =
false;
730 static bool const is_v =
false;
746 template<
typename T >
755 template<
typename T >
757 :
public integral_constant<bool, tt::cv<T>::is_v > { };
766 template<
typename,
bool >
770 template<
typename C >
774 template<
typename T >
775 static no_t take( T (*)[1] );
776 template<
typename T >
777 static yes_t take( ... );
780 static bool const value =
sizeof( take<C>(0) ) ==
sizeof(
yes_t);
790 template<
typename T >
819 template<
typename T >
822 template<
typename T >
825 template<
typename T >
851 template<
typename T >
854 template<
typename T >
857 template<
typename T >
868 template<
typename T >
876 template<
unsigned I >
880 template<
typename T,
unsigned N >
888 template<
unsigned I >
897 template<
typename T >
905 template<
unsigned I >
916 template<
typename T >
925 template<
typename T,
unsigned I >
927 :
public integral_constant<int, tt::arr<T>::template extent<I>::value> { };
934 template<
typename T,
typename U >
936 template<
typename T >
948 template<
typename T >
950 template<
typename T >
963 template<
typename From,
typename To,
bool >
967 template<
typename From,
typename To >
971 static yes_t take( To,
int );
976 static bool const value
977 =
sizeof( take( from, 0 ) ) ==
sizeof(
yes_t);
987 template<
typename From,
typename To >
989 :
public tt::converts<From,To,is_abstract<To>::value> { };
994 template<
typename T >
998 template<
typename T >
1006 template<
typename T >
1010 template<
typename T >
1018 template<
typename T >
1022 template<
typename T >
1030 template<
typename T >
1034 template<
typename T >
1038 template<
typename From,
int N,
typename To >
1042 template<
typename From,
typename To,
int N >
1051 template<
typename T >
1062 template<
typename T >
1073 template<
typename T >
1084 template<
typename T >
1095 template<
typename T >
1106 template<
typename T >
1119 template<
typename T
1125 #if defined(CLHEP_HAS_RVALUE_REFERENCE)
1126 typedef T&& add_rref_type;
1127 #endif // CLHEP_HAS_RVALUE_REFERENCE
1131 template<
typename T >
1139 #if defined(CLHEP_HAS_RVALUE_REFERENCE)
1140 template<
typename T >
1143 typedef T& add_lref_type;
1144 typedef T&& add_rref_type;
1145 typedef T rem_ref_type;
1147 #endif // CLHEP_HAS_RVALUE_REFERENCE
1149 template<
typename T >
1164 template<
typename T >
1175 template<
typename T >
1186 template<
typename T >
1199 template<
typename T >
1206 template<
typename T >
1213 template<
typename T >
1220 template<
typename T >
1227 template<
typename T >
1228 struct ptr<T *
const volatile>
1241 template<
typename T >
1252 template<
typename T >
1263 template<
typename T >
1274 template<
typename T >
1301 template<
typename From,
typename To >
1309 static bool const value
1318 template<
typename From
1323 :
public enable_if< is_convertible<From,To>::value, R > { };
1330 template<
typename From
1334 struct enable_if_ptr_convertible
1335 :
public enable_if< is_ptr_convertible<From,To>::value, R > { };
1342 template<
typename P
1345 struct enable_if_auto_ptr { };
1347 template<
typename P,
typename R >
1359 #endif // HEP_TYPE_TRAITS_H
integral_constant< bool, false > false_type
T const volatile add_v_type
tt::cv< T >::rem_c_type type
T *volatile * add_ptr_type
tt::cv< T >::add_cv_type type
typedef int(XMLCALL *XML_NotStandaloneHandler)(void *userData)
any_conversion(T const volatile &)
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData
tt::arr< T >::rem_arr_type type
tt::ref< T >::add_rref_type type
T const volatile add_cv_type
tt::cv< T >::add_v_type type
const G4ThreeVector const G4double const
tt::ptr< T >::rem_ptr_type type
integral_constant< bool, true > true_type
tt::cv< T >::add_c_type type
T const volatile add_cv_type
no_t isAfunction(U(*)[1])
tt::cv< T >::rem_v_type type
yes_t isAclass(void(U::*)())
ParticleList decay(Cluster *const c)
Carries out a cluster decay.
T const volatile add_cv_type
tt::ref< T >::rem_ref_type * add_ptr_type
tt::ref< T >::rem_ref_type type
T const volatile add_v_type
integral_constant< T, v > type
T const volatile add_c_type
tt::ptr< T >::add_ptr_type type
tt::cv< T >::rem_cv_type type
static value_type const value
T const volatile add_c_type
tt::ref< T >::add_lref_type type
tt::arr< T >::rem_arr_type rem_arr_type
tt::arr< T >::rem_ext_type type
T *const volatile * add_ptr_type
const XML_Char int const XML_Char * value
T const volatile add_cv_type
static tt::yes_t take(To *)