X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=boost%2Frange%2Fdetail%2Fvc6%2Fend.hpp;fp=boost%2Frange%2Fdetail%2Fvc6%2Fend.hpp;h=4f76af5d6bbd1d674851d2571185f41c425a0f91;hp=0000000000000000000000000000000000000000;hb=2d71eb92104693ca9baa5a2e1c23eeca776d8fd3;hpb=da57529b92adbb7ae74a89861cb39fb35ac7c62d diff --git a/boost/range/detail/vc6/end.hpp b/boost/range/detail/vc6/end.hpp new file mode 100644 index 0000000..4f76af5 --- /dev/null +++ b/boost/range/detail/vc6/end.hpp @@ -0,0 +1,170 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. 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_VC6_END_HPP +#define BOOST_RANGE_DETAIL_VC6_END_HPP + +#include +#include +#include +#include +#include + +namespace boost +{ + namespace range_detail + { + template< typename T > + struct range_end; + + ////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename C > + struct inner { + static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator::type + fun( C& c ) + { + return c.end(); + }; + }; + }; + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename P > + struct inner { + static BOOST_RANGE_DEDUCED_TYPENAME range_result_iterator

::type + fun( const P& p ) + { + return p.second; + } + }; + }; + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename T > + struct inner { + static BOOST_DEDUCED_TYPENAME remove_extent::type* + fun(T& t) + { + return t + remove_extent::size; + } + }; + }; + + + template<> + struct range_end + { + template< typename T > + struct inner { + static BOOST_DEDUCED_TYPENAME remove_extent::type* + fun(T& t) + { + return t + remove_extent::size; + } + }; + }; + + template<> + struct range_end + { + template< typename T > + struct inner { + static BOOST_DEDUCED_TYPENAME remove_extent::type* + fun(T& t) + { + return t + remove_extent::size; + } + }; + }; + + ////////////////////////////////////////////////////////////////////// + // string + ////////////////////////////////////////////////////////////////////// + + template<> + struct range_end + { + template< typename T > + struct inner { + static char* fun( char* s ) + { + return boost::range_detail::str_end( s ); + } + }; + }; + + template<> + struct range_end + { + template< typename T > + struct inner { + static const char* fun( const char* s ) + { + return boost::range_detail::str_end( s ); + } + }; + }; + + template<> + struct range_end + { + template< typename T > + struct inner { + static wchar_t* fun( wchar_t* s ) + { + return boost::range_detail::str_end( s ); + } + }; + }; + + + template<> + struct range_end + { + template< typename T > + struct inner { + static const wchar_t* fun( const wchar_t* s ) + { + return boost::range_detail::str_end( s ); + } + }; + }; + + } // namespace 'range_detail' + + template< typename C > + inline BOOST_DEDUCED_TYPENAME range_result_iterator::type + end( C& c ) + { + return range_detail::range_end::type>::inner::fun( c ); + } + +} // namespace 'boost' + + +#endif