A class holding a constant called value that evaluates to true if and only if Base is the same type as Derived or Derived is a class derived from Base.
More...
#include <meta_programming.hh>

Classes | |
| struct | Any |
| A class that is constructible from just anything. More... | |
Public Types | |
| enum | anonymous_enum { value = (sizeof(func(derived_object())) == sizeof(char)) } |
Public Member Functions | |
| PPL_COMPILE_TIME_CHECK (sizeof(char)!=sizeof(double),"architecture with sizeof(char) == sizeof(double)"" (!?)") | |
Static Public Member Functions | |
| static char | func (const Base &) |
Overloading with Base. | |
| static double | func (Any) |
Overloading with Any. | |
| static const Derived & | derived_object () |
A function obtaining a const reference to a Derived object. | |
A class holding a constant called value that evaluates to true if and only if Base is the same type as Derived or Derived is a class derived from Base.
template <typename T> struct B; template <typename T> struct D : public B<T>;
U, we have Is_Same_Or_Derived<B<U>, Type>:: anonymous_enum:: value == true. But we can do as follows: struct B_Base { }; template <typename T> struct B : public B_Base;
Is_Same_Or_Derived<B_Base, Type>:: anonymous_enum:: value. Definition at line 224 of file meta_programming.hh.
| enum Parma_Polyhedra_Library::Is_Same_Or_Derived::anonymous_enum |
Definition at line 248 of file meta_programming.hh.
00248 { 00256 value = (sizeof(func(derived_object())) == sizeof(char)) 00257 };
| static const Derived& Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::derived_object | ( | ) | [static] |
A function obtaining a const reference to a Derived object.
| static double Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::func | ( | Any | ) | [static] |
Overloading with Any.
| static char Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::func | ( | const Base & | ) | [static] |
Overloading with Base.
| Parma_Polyhedra_Library::Is_Same_Or_Derived< Base, Derived >::PPL_COMPILE_TIME_CHECK | ( | sizeof(char)! | = sizeof(double) |
) |
1.6.3