summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-23 13:16:26 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-23 14:43:26 (GMT)
commit491ddd570a752cf9bda85933bed0c6942e39b1f9 (patch)
tree10c25c1be8cc08d0497df1dccd56a10fbb30beee /3rdParty/Boost/src/boost/utility/identity_type.hpp
parentda7d7a0ca71b80281aa9ff2526290b61ccb0cc60 (diff)
downloadswift-491ddd570a752cf9bda85933bed0c6942e39b1f9.zip
swift-491ddd570a752cf9bda85933bed0c6942e39b1f9.tar.bz2
Update Boost to 1.52.0.
Change-Id: I1e56bea2600bf2ed9c5b3aba8c4f9d2a0f350e77
Diffstat (limited to '3rdParty/Boost/src/boost/utility/identity_type.hpp')
-rw-r--r--3rdParty/Boost/src/boost/utility/identity_type.hpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/utility/identity_type.hpp b/3rdParty/Boost/src/boost/utility/identity_type.hpp
new file mode 100644
index 0000000..4a1f6c4
--- /dev/null
+++ b/3rdParty/Boost/src/boost/utility/identity_type.hpp
@@ -0,0 +1,46 @@
+
+// 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
+