Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template type_id_with_cvr

boost::typeindex::type_id_with_cvr

Synopsis

// In header: <boost/type_index.hpp>


template<typename T> type_index type_id_with_cvr();

Description

Function for constructing boost::typeindex::type_index instance for type T. Does not remove const, volatile, & and && modifiers from T.

If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling type_id<T>().

Example:

type_index ti = type_id_with_cvr<int&>();
std::cout << ti.pretty_name();  // Outputs 'int&'

Template Parameters:

T

Type for which type_index must be created.

Returns:

boost::typeindex::type_index with information about the specified type T.

Throws:

Nothing.

PrevUpHomeNext