Sha256: f0dcb5c8f78fbd469389e39c2a439aa8f2632d525fcb17a6ab49ff8c69412467

Contents?: true

Size: 1.63 KB

Versions: 55

Compression:

Stored size: 1.63 KB

Contents

// Copyright (C) 2009-2012 Lorenzo Caminiti
// Distributed under the Boost Software License, Version 1.0
// (see accompanying file LICENSE_1_0.txt or a copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Home at http://www.boost.org/libs/utility/identity_type

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

#ifndef BOOST_IDENTITY_TYPE_HPP_
#define BOOST_IDENTITY_TYPE_HPP_

#include <boost/type_traits/function_traits.hpp>

/**
@brief 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).

@Params
@Param{parenthesized_type,
The type expression to be passed as macro parameter wrapped by a single set
of round parenthesis <c>(...)</c>.
This type expression can contain an arbitrary number of commas.
}
@EndParams

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

This macro must be prefixed by <c>typename</c> 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.
*/
#define BOOST_IDENTITY_TYPE(parenthesized_type) \
    /* must NOT prefix this with `::` to work with parenthesized syntax */ \
    boost::function_traits< void parenthesized_type >::arg1_type

#endif // #include guard

Version data entries

55 entries across 55 versions & 3 rubygems

Version Path
passenger-6.0.23 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.20 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.19 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.18 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.17 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.16 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.15 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.14 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.13 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.12 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.11 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.10 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.9 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.8 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.7 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.6 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.5 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.4 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.3 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp
passenger-6.0.2 src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp