X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Frange%2Fdetail%2Fremove_extent.hpp;fp=boost%2Frange%2Fdetail%2Fremove_extent.hpp;h=68e45972456e6c0b94b9b7d9354e10e3a27877c2;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/range/detail/remove_extent.hpp b/boost/range/detail/remove_extent.hpp new file mode 100644 index 0000000..68e4597 --- /dev/null +++ b/boost/range/detail/remove_extent.hpp @@ -0,0 +1,157 @@ +// Boost.Range library +// +// Copyright Jonathan Turkanis 2005. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + + +#ifndef BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP +#define BOOST_RANGE_DETAIL_REMOVE_BOUNDS_HPP + +#include // MSVC, NO_INTRINSIC_WCHAR_T, put size_t in std. +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + + template< typename Case1 = mpl::true_, + typename Type1 = mpl::void_, + typename Case2 = mpl::true_, + typename Type2 = mpl::void_, + typename Case3 = mpl::true_, + typename Type3 = mpl::void_, + typename Case4 = mpl::true_, + typename Type4 = mpl::void_, + typename Case5 = mpl::true_, + typename Type5 = mpl::void_, + typename Case6 = mpl::true_, + typename Type6 = mpl::void_, + typename Case7 = mpl::true_, + typename Type7 = mpl::void_, + typename Case8 = mpl::true_, + typename Type8 = mpl::void_, + typename Case9 = mpl::true_, + typename Type9 = mpl::void_, + typename Case10 = mpl::true_, + typename Type10 = mpl::void_, + typename Case11 = mpl::true_, + typename Type11 = mpl::void_, + typename Case12 = mpl::true_, + typename Type12 = mpl::void_, + typename Case13 = mpl::true_, + typename Type13 = mpl::void_, + typename Case14 = mpl::true_, + typename Type14 = mpl::void_, + typename Case15 = mpl::true_, + typename Type15 = mpl::void_, + typename Case16 = mpl::true_, + typename Type16 = mpl::void_, + typename Case17 = mpl::true_, + typename Type17 = mpl::void_, + typename Case18 = mpl::true_, + typename Type18 = mpl::void_, + typename Case19 = mpl::true_, + typename Type19 = mpl::void_, + typename Case20 = mpl::true_, + typename Type20 = mpl::void_> + struct select { + typedef typename + mpl::eval_if< + Case1, mpl::identity, mpl::eval_if< + Case2, mpl::identity, mpl::eval_if< + Case3, mpl::identity, mpl::eval_if< + Case4, mpl::identity, mpl::eval_if< + Case5, mpl::identity, mpl::eval_if< + Case6, mpl::identity, mpl::eval_if< + Case7, mpl::identity, mpl::eval_if< + Case8, mpl::identity, mpl::eval_if< + Case9, mpl::identity, mpl::if_< + Case10, Type10, mpl::void_ > > > > > > > > > + >::type result1; + typedef typename + mpl::eval_if< + Case11, mpl::identity, mpl::eval_if< + Case12, mpl::identity, mpl::eval_if< + Case13, mpl::identity, mpl::eval_if< + Case14, mpl::identity, mpl::eval_if< + Case15, mpl::identity, mpl::eval_if< + Case16, mpl::identity, mpl::eval_if< + Case17, mpl::identity, mpl::eval_if< + Case18, mpl::identity, mpl::eval_if< + Case19, mpl::identity, mpl::if_< + Case20, Type20, mpl::void_ > > > > > > > > > + > result2; + typedef typename + mpl::eval_if< + is_same, + result2, + mpl::identity + >::type type; + }; + + template + struct remove_extent { + static T* ar; + BOOST_STATIC_CONSTANT(std::size_t, size = sizeof(*ar) / sizeof((*ar)[0])); + + typedef typename + select< + is_same, bool, + is_same, char, + is_same, signed char, + is_same, unsigned char, + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + is_same, wchar_t, + #endif + is_same, short, + is_same, unsigned short, + is_same, int, + is_same, unsigned int, + is_same, long, + is_same, unsigned long, + is_same, float, + is_same, double, + is_same, long double + >::type result1; + typedef typename + select< + is_same, const bool, + is_same, const char, + is_same, const signed char, + is_same, const unsigned char, + #ifndef BOOST_NO_INTRINSIC_WCHAR_T + is_same, const wchar_t, + #endif + is_same, const short, + is_same, const unsigned short, + is_same, const int, + is_same, const unsigned int, + is_same, const long, + is_same, const unsigned long, + is_same, const float, + is_same, const double, + is_same, const long double + > result2; + typedef typename + mpl::eval_if< + is_same, + result2, + mpl::identity + >::type type; + }; + + } // namespace 'range_detail' + +} // namespace 'boost' + + +#endif