diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-03-28 15:46:49 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-03-28 15:46:49 (GMT) |
commit | f53a1ef582494458301b97bf6e546be52d7ff7e8 (patch) | |
tree | 7571b5cbcbd8a8f1dd1c966c9045b6cb69f0e295 /3rdParty/Boost/src/boost/type_traits/msvc/remove_bounds.hpp | |
parent | 638345680d72ca6acaf123f2c8c1c391f696e371 (diff) | |
download | swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.zip swift-contrib-f53a1ef582494458301b97bf6e546be52d7ff7e8.tar.bz2 |
Moving submodule contents back.
Diffstat (limited to '3rdParty/Boost/src/boost/type_traits/msvc/remove_bounds.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/type_traits/msvc/remove_bounds.hpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/type_traits/msvc/remove_bounds.hpp b/3rdParty/Boost/src/boost/type_traits/msvc/remove_bounds.hpp new file mode 100644 index 0000000..12a9b05 --- /dev/null +++ b/3rdParty/Boost/src/boost/type_traits/msvc/remove_bounds.hpp @@ -0,0 +1,43 @@ +// Copyright (C) 2004 Peder Holt +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 +#define BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 + +#include <boost/type_traits/msvc/typeof.hpp> +#include <boost/type_traits/is_array.hpp> + +namespace boost { + namespace detail { + template<bool IsArray> + struct remove_bounds_impl_typeof { + template<typename T,typename ID> + struct inner { + typedef T type; + }; + }; + template<> + struct remove_bounds_impl_typeof<true> { + template<typename T,typename ID> + struct inner { + template<typename U> + static msvc_register_type<U,ID> test(U[]); + static msvc_register_type<T,ID> test(...); + BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); + typedef typename msvc_extract_type<ID>::id2type::type type; + }; + }; + } //namespace detail + + template<typename T> + struct remove_bounds { + typedef typename detail::remove_bounds_impl_typeof< + boost::is_array<T>::value + >::template inner<T,remove_bounds<T> >::type type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_bounds,T) + }; +} //namespace boost + +#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 + |