Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
identity_type.hpp File Reference

Wrap type expressions with round parenthesis so they can be passed to macros even if they contain commas. More...

Include dependency graph for identity_type.hpp:
This graph shows which files directly or indirectly include this file:

Macros

#define BOOST_IDENTITY_TYPE(parenthesized_type)
 This macro allows to wrap the specified type expression within extra round parenthesis so the type can be passed as a single macro parameter even if it contains commas (not already wrapped within round parenthesis). More...
 

Detailed Description

Wrap type expressions with round parenthesis so they can be passed to macros even if they contain commas.

Macro Definition Documentation

#define BOOST_IDENTITY_TYPE (   parenthesized_type)
Value:
/* must NOT prefix this with `::` to work with parenthesized syntax */ \
boost::function_traits< void parenthesized_type >::arg1_type

This macro allows to wrap the specified type expression within extra round parenthesis so the type can be passed as a single macro parameter even if it contains commas (not already wrapped within round parenthesis).

{parenthesized_type, The type expression to be passed as macro parameter wrapped by a single set of round parenthesis (...). This type expression can contain an arbitrary number of commas. }

This macro works on any C++03 compiler (it does not use variadic macros).

This macro must be prefixed by typename when used within templates. Note that the compiler will not be able to automatically determine function template parameters when they are wrapped with this macro (these parameters need to be explicitly specified when calling the function template).

On some compilers (like GCC), using this macro on abstract types requires to add and remove a reference to the specified type.