From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- .../boost/type_traits/add_rvalue_reference.hpp | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 libcutl/cutl/details/boost/type_traits/add_rvalue_reference.hpp (limited to 'libcutl/cutl/details/boost/type_traits/add_rvalue_reference.hpp') diff --git a/libcutl/cutl/details/boost/type_traits/add_rvalue_reference.hpp b/libcutl/cutl/details/boost/type_traits/add_rvalue_reference.hpp new file mode 100644 index 0000000..2adb737 --- /dev/null +++ b/libcutl/cutl/details/boost/type_traits/add_rvalue_reference.hpp @@ -0,0 +1,66 @@ +// add_rvalue_reference.hpp ---------------------------------------------------------// + +// Copyright 2010 Vicente J. Botet Escriba + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP +#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + +#include + +//----------------------------------------------------------------------------// + +#include +#include + +// should be the last #include +#include + +//----------------------------------------------------------------------------// +// // +// C++03 implementation of // +// 20.9.7.2 Reference modifications [meta.trans.ref] // +// Written by Vicente J. Botet Escriba // +// // +// If T names an object or function type then the member typedef type +// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects +// the semantics of reference collapsing. For example, when a type T names +// a type T1&, the type add_rvalue_reference::type is not an rvalue +// reference. -end note ] +//----------------------------------------------------------------------------// + +namespace cutl_details_boost { + +namespace type_traits_detail { + + template + struct add_rvalue_reference_helper + { typedef T type; }; + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + template + struct add_rvalue_reference_helper + { + typedef T&& type; + }; +#endif + + template + struct add_rvalue_reference_imp + { + typedef typename cutl_details_boost::type_traits_detail::add_rvalue_reference_helper + ::value == false && is_reference::value == false) >::type type; + }; + +} + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_rvalue_reference,T,typename cutl_details_boost::type_traits_detail::add_rvalue_reference_imp::type) + +} // namespace cutl_details_boost + +#include + +#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + -- cgit v1.2.3