CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

Classes | Macros | Typedefs | Enumerations | Functions
testPrimaryTraits.cc File Reference
#include "CLHEP/Utility/noncopyable.h"
#include "CLHEP/Utility/type_traits.h"
#include <cassert>

Go to the source code of this file.

Classes

struct  UDT
 
struct  POD_UDT
 
struct  empty_UDT
 
struct  empty_POD_UDT
 
union  union_UDT
 
union  POD_union_UDT
 
union  empty_union_UDT
 
union  empty_POD_union_UDT
 
struct  nothrow_copy_UDT
 
struct  nothrow_assign_UDT
 
struct  nothrow_construct_UDT
 
class  Base
 
class  Derived
 
class  Derived2
 
class  MultiBase
 
class  PrivateBase
 
class  NonDerived
 
struct  VB
 
struct  VD
 
struct  non_pointer
 
struct  non_int_pointer
 
struct  int_constructible
 
struct  int_convertible
 
struct  non_empty
 
struct  test_abc1
 
struct  test_abc2
 
struct  test_abc3
 
struct  polymorphic_base
 
struct  polymorphic_derived1
 
struct  polymorphic_derived2
 
struct  virtual_inherit1
 
struct  virtual_inherit2
 
struct  virtual_inherit3
 
struct  virtual_inherit4
 
struct  virtual_inherit5
 
struct  virtual_inherit6
 
struct  trivial_except_construct
 
struct  trivial_except_destroy
 
struct  trivial_except_copy
 
struct  trivial_except_assign
 
struct  wrap< T >
 
struct  convertible_to_pointer
 

Macros

#define claim_void(Type)   (is_void<Type>::value)
 
#define has_void_type(Type)   assert(claim_void(Type))
 
#define has_nonvoid_type(Type)   assert(!claim_void(Type))
 
#define claim_integral(Type)   (is_integral<Type>::value)
 
#define has_integral_type(Type)   assert(claim_integral(Type))
 
#define has_nonintegral_type(Type)   assert(!claim_integral(Type))
 
#define claim_floating(Type)   (is_floating_point<Type>::value)
 
#define has_floating_type(Type)   assert(claim_floating(Type))
 
#define has_nonfloating_type(Type)   assert(!claim_floating(Type))
 
#define claim_array(Type)   (is_array<Type>::value)
 
#define has_array_type(Type)   assert(claim_array(Type))
 
#define has_nonarray_type(Type)   assert(!claim_array(Type))
 
#define claim_ptr(Type)   (is_pointer<Type>::value)
 
#define has_ptr_type(Type)   assert(claim_ptr(Type))
 
#define has_nonptr_type(Type)   assert(!claim_ptr(Type))
 
#define claim_lref(Type)   (is_lvalue_reference<Type>::value)
 
#define has_lref_type(Type)   assert(claim_lref(Type))
 
#define has_nonlref_type(Type)   assert(!claim_lref(Type))
 
#define claim_ref(Type)   (is_reference<Type>::value)
 
#define has_ref_type(Type)   assert(claim_ref(Type))
 
#define has_nonref_type(Type)   assert(!claim_ref(Type))
 
#define lref(Type)   has_lref_type(Type); has_ref_type(Type);
 
#define nonref(Type)   has_nonlref_type(Type); has_nonref_type(Type);
 
#define claim_mbrobjptr(Type)   (is_member_object_pointer<Type>::value)
 
#define has_mbrobjptr_type(Type)   assert(claim_mbrobjptr(Type))
 
#define has_nonmbrobjptr_type(Type)   assert(!claim_mbrobjptr(Type))
 
#define claim_mbrfctnptr(Type)   (is_member_function_pointer<Type>::value)
 
#define has_mbrfctnptr_type(Type)   assert(claim_mbrfctnptr(Type))
 
#define has_nonmbrfctnptr_type(Type)   assert(!claim_mbrfctnptr(Type))
 
#define claim_enum(Type)   (is_enum<Type>::value)
 
#define has_enum_type(Type)   assert(claim_enum(Type))
 
#define has_nonenum_type(Type)   assert(!claim_enum(Type))
 

Typedefs

typedef void(* f1) ()
 
typedef int(* f2) (int)
 
typedef int(* f3) (int, bool)
 
typedef void(UDT::* mf1) ()
 
typedef int(UDT::* mf2) ()
 
typedef int(UDT::* mf3) (int)
 
typedef int(UDT::* mf4) (int, float)
 
typedef intUDT::* mp
 
typedef int(UDT::* cmf) (int) const
 
typedef int & r_type
 
typedef const r_type cr_type
 
typedef void foo0_t()
 
typedef void foo1_t(int)
 
typedef void foo2_t(int &, double)
 
typedef void foo3_t(int &, bool, int, int)
 
typedef void foo4_t(int, bool, int *, int[], int, int, int, int, int)
 
typedef const doubleUDT::* mp2
 

Enumerations

enum  enum_UDT { one , two , three }
 
enum  enum1 { one_ , two_ }
 
enum  enum2 { three_ , four_ }
 

Functions

int main ()
 

Macro Definition Documentation

◆ claim_array

#define claim_array (   Type)    (is_array<Type>::value)

◆ claim_enum

#define claim_enum (   Type)    (is_enum<Type>::value)

◆ claim_floating

#define claim_floating (   Type)    (is_floating_point<Type>::value)

◆ claim_integral

#define claim_integral (   Type)    (is_integral<Type>::value)

◆ claim_lref

#define claim_lref (   Type)    (is_lvalue_reference<Type>::value)

◆ claim_mbrfctnptr

#define claim_mbrfctnptr (   Type)    (is_member_function_pointer<Type>::value)

◆ claim_mbrobjptr

#define claim_mbrobjptr (   Type)    (is_member_object_pointer<Type>::value)

◆ claim_ptr

#define claim_ptr (   Type)    (is_pointer<Type>::value)

◆ claim_ref

#define claim_ref (   Type)    (is_reference<Type>::value)

◆ claim_void

#define claim_void (   Type)    (is_void<Type>::value)

◆ has_array_type

#define has_array_type (   Type)    assert(claim_array(Type))

◆ has_enum_type

#define has_enum_type (   Type)    assert(claim_enum(Type))

◆ has_floating_type

#define has_floating_type (   Type)    assert(claim_floating(Type))

◆ has_integral_type

#define has_integral_type (   Type)    assert(claim_integral(Type))

◆ has_lref_type

#define has_lref_type (   Type)    assert(claim_lref(Type))

◆ has_mbrfctnptr_type

#define has_mbrfctnptr_type (   Type)    assert(claim_mbrfctnptr(Type))

◆ has_mbrobjptr_type

#define has_mbrobjptr_type (   Type)    assert(claim_mbrobjptr(Type))

◆ has_nonarray_type

#define has_nonarray_type (   Type)    assert(!claim_array(Type))

◆ has_nonenum_type

#define has_nonenum_type (   Type)    assert(!claim_enum(Type))

◆ has_nonfloating_type

#define has_nonfloating_type (   Type)    assert(!claim_floating(Type))

◆ has_nonintegral_type

#define has_nonintegral_type (   Type)    assert(!claim_integral(Type))

◆ has_nonlref_type

#define has_nonlref_type (   Type)    assert(!claim_lref(Type))

◆ has_nonmbrfctnptr_type

#define has_nonmbrfctnptr_type (   Type)    assert(!claim_mbrfctnptr(Type))

◆ has_nonmbrobjptr_type

#define has_nonmbrobjptr_type (   Type)    assert(!claim_mbrobjptr(Type))

◆ has_nonptr_type

#define has_nonptr_type (   Type)    assert(!claim_ptr(Type))

◆ has_nonref_type

#define has_nonref_type (   Type)    assert(!claim_ref(Type))

◆ has_nonvoid_type

#define has_nonvoid_type (   Type)    assert(!claim_void(Type))

◆ has_ptr_type

#define has_ptr_type (   Type)    assert(claim_ptr(Type))

◆ has_ref_type

#define has_ref_type (   Type)    assert(claim_ref(Type))

◆ has_void_type

#define has_void_type (   Type)    assert(claim_void(Type))

◆ lref

#define lref (   Type)    has_lref_type(Type); has_ref_type(Type);

◆ nonref

#define nonref (   Type)    has_nonlref_type(Type); has_nonref_type(Type);

Typedef Documentation

◆ cmf

typedef int(UDT::* cmf) (int) const

Definition at line 50 of file testPrimaryTraits.cc.

◆ cr_type

typedef const r_type cr_type

Definition at line 62 of file testPrimaryTraits.cc.

◆ f1

typedef void(* f1) ()

Definition at line 42 of file testPrimaryTraits.cc.

◆ f2

typedef int(* f2) (int)

Definition at line 43 of file testPrimaryTraits.cc.

◆ f3

typedef int(* f3) (int, bool)

Definition at line 44 of file testPrimaryTraits.cc.

◆ foo0_t

typedef void foo0_t()

Definition at line 213 of file testPrimaryTraits.cc.

◆ foo1_t

typedef void foo1_t(int)

Definition at line 214 of file testPrimaryTraits.cc.

◆ foo2_t

typedef void foo2_t(int &, double)

Definition at line 215 of file testPrimaryTraits.cc.

◆ foo3_t

typedef void foo3_t(int &, bool, int, int)

Definition at line 216 of file testPrimaryTraits.cc.

◆ foo4_t

typedef void foo4_t(int, bool, int *, int[], int, int, int, int, int)

Definition at line 217 of file testPrimaryTraits.cc.

◆ mf1

typedef void(UDT::* mf1) ()

Definition at line 45 of file testPrimaryTraits.cc.

◆ mf2

typedef int(UDT::* mf2) ()

Definition at line 46 of file testPrimaryTraits.cc.

◆ mf3

typedef int(UDT::* mf3) (int)

Definition at line 47 of file testPrimaryTraits.cc.

◆ mf4

typedef int(UDT::* mf4) (int, float)

Definition at line 48 of file testPrimaryTraits.cc.

◆ mp

typedef intUDT::* mp

Definition at line 49 of file testPrimaryTraits.cc.

◆ mp2

typedef const doubleUDT::* mp2

Definition at line 259 of file testPrimaryTraits.cc.

◆ r_type

typedef int& r_type

Definition at line 60 of file testPrimaryTraits.cc.

Enumeration Type Documentation

◆ enum1

enum enum1
Enumerator
one_ 
two_ 

Definition at line 136 of file testPrimaryTraits.cc.

◆ enum2

enum enum2
Enumerator
three_ 
four_ 

Definition at line 139 of file testPrimaryTraits.cc.

◆ enum_UDT

enum enum_UDT
Enumerator
one 
two 
three 

Definition at line 27 of file testPrimaryTraits.cc.

Function Documentation

◆ main()

int main ( )