libsigc++ 2.0: sigc::is_base_and_derived< T_base, T_derived > Struct Template Reference

Main Page Groups Namespaces

# sigc::is_base_and_derived< T_base, T_derived > Struct Template Reference

Compile-time determination of base-class relationship in C++ (adapted to match the syntax of boost's type_traits library). More...

List of all members.

## Public Member Functions
void | avoid_gcc3_warning_ ()
## Static Public Attributes
static const bool | value
## Friends
struct | internal_class
## Classes
struct | big
struct | internal_class

## Detailed Description

### template <class T_base, class T_derived>
struct sigc::is_base_and_derived< T_base, T_derived >

Compile-time determination of base-class relationship in C++ (adapted to match the syntax of boost's type_traits library).

Use this to provide a template specialization for a set of types. For instance,

template <class T_thing, bool Tval_derives_from_something = sigc::is_base_and_derived<Something, T_thing>::value> class TheTemplate { //Standard implementation. }

//Specialization for T_things that derive from Something (Tval_derives_from_something is true) template <class t_thing>=""> class TheTemplate<T_thing, true> { T_thing thing; thing.method_that_is_in_something(); }

## Member Function Documentation

template <class T_base, class T_derived>

void sigc::is_base_and_derived<T_base, T_derived>::avoid_gcc3_warning_ | ( |  | ) |

## Friends And Related Function Documentation

template <class T_base, class T_derived>

friend struct internal_class`[friend]`

## Member Data Documentation

template <class T_base, class T_derived>

const bool sigc::is_base_and_derived<T_base, T_derived>::value`[static]`

Initial value:

        sizeof(internal_class::is_base_class_(reinterpret_cast<typename type_trait<T_derived>::pointer>(0))) ==
        sizeof(char)

The documentation for this struct was generated from the following file:

- type_traits.h