libcwd: The C++ Debugging Support Library - Reference Manual
Author: Carlo Wood
Description: C++ debugging support library with ostream debug output
Keywords: libcwd, debug output, debug facility, debug channel, object orientation, OO, C++, nested debug output, ostream, memory allocation, debugging, source file and line number

Main Page Reference Manual Namespace List Compound List Namespace Members Compound Members File Members

# Getting Type Information Of Types And Symbols
[Program Symbols Access And Interpretation]

Collaboration diagram for Getting Type Information Of Types And Symbols:

## Classes
class | libcwd::type_info_ct
| Class that holds type information for debugging purposes. Returned by type_info_of(). More...
## Related
| demangle_type() and demangle_symbol()
## Functions
template<typename T >
type_info_ct const & | libcwd::type_info_of (void)
| Get type information of a given class or type.
template<typename T >
type_info_ct const & | libcwd::type_info_of (T const &)
| Get type information of a given class instance.

## Detailed Description

## Function Documentation

template<typename T >

type_info_ct const& libcwd::type_info_of | ( | T const & |  | ) | `[inline]`

Get type information of a given class instance.

This template is used by passing an object to it, top level CV-qualifiers (and a possible reference) are ignored in the same way as does `typeid()` (see 5.2.8 Type identification of the ISO C++ standard).

template<typename T >

type_info_ct const& libcwd::type_info_of | ( | void |  | ) | `[inline]`

Get type information of a given class or type.

This specialization allows to specify a type without an object (for example by calling: `type_info_of<int const>()`).

As it doesn't ignore top-level qualifiers it is best suited to print for example template parameters. For example,

     template<typename T>
       void Foo::func(T const&)
       {
         Dout(dc::notice, "Calling Foo::func(" << type_info_of<T const&>().demangled_name() << ')');
       }