From b9411f807f8a13ed3f59da5b827f62fc66d50dac Mon Sep 17 00:00:00 2001 From: Lorenzo Caminiti Date: Fri, 13 Apr 2012 01:02:02 +0000 Subject: [PATCH] Added Lorenzo Caminiti to maintainers.txt and libraries.htm. [SVN r77945] --- identity_type/doc/html/index.html | 6 +++--- identity_type/doc/identity_type.qbk | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/identity_type/doc/html/index.html b/identity_type/doc/html/index.html index b2f2e30..2374aed 100644 --- a/identity_type/doc/html/index.html +++ b/identity_type/doc/html/index.html @@ -4,8 +4,8 @@ file LICENSE_1_0.txt or a copy at http://www.boost.org/LICENSE_1_0.txt)

Table of Contents

Motivation
Solution
Templates
Abstract Types
Annex: Usage
Annex: Implementation
Reference

- This library allows to wrap type expressions within round parenthesis so they - can be passed to macros even when they contain commas. + This library allows to wrap types within round parenthesis so they can always + be passed as macro parameters.

Consider the following macro which declares a variable named varn with the specified type (see also @@ -236,7 +236,7 @@ BOOST_IDENTITY_TYPE(parenthesized_type)

Macro BOOST_IDENTITY_TYPE

BOOST_IDENTITY_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).

Synopsis

// In header: <boost/utility/identity_type.hpp>
 
-BOOST_IDENTITY_TYPE(parenthesized_type)

Description

Parameters:

parenthesized_typeThe 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.

+BOOST_IDENTITY_TYPE(parenthesized_type)

Description

Parameters:

parenthesized_typeThe 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.



[1] Using variadic macros, it would be possible to require a single set of extra parenthesis BOOST_IDENTITY_TYPE(type) instead of two BOOST_IDENTITY_TYPE((type)) but variadic macros are not part of C++03 diff --git a/identity_type/doc/identity_type.qbk b/identity_type/doc/identity_type.qbk index ede7510..1c97616 100644 --- a/identity_type/doc/identity_type.qbk +++ b/identity_type/doc/identity_type.qbk @@ -19,7 +19,7 @@ [category Utilities] ] -This library allows to wrap type expressions within round parenthesis so they can be passed to macros even when they contain commas. +This library allows to wrap types within round parenthesis so they can always be passed as macro parameters. [import ../test/var_error.cpp] [import ../test/var.cpp]