]> git.donarmstrong.com Git - rsem.git/blob - boost/range/detail/size_type.hpp
Updated boost to v1.55.0
[rsem.git] / boost / range / detail / size_type.hpp
1 // Boost.Range library
2 //
3 //  Copyright Thorsten Ottosen 2003-2004. Use, modification and
4 //  distribution is subject to the Boost Software License, Version
5 //  1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 //  http://www.boost.org/LICENSE_1_0.txt)
7 //
8 // For more information, see http://www.boost.org/libs/range/
9 //
10
11 #ifndef BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
12 #define BOOST_RANGE_DETAIL_SIZE_TYPE_HPP
13
14 #include <boost/range/detail/common.hpp>
15
16 //////////////////////////////////////////////////////////////////////////////
17 // missing partial specialization  workaround.
18 //////////////////////////////////////////////////////////////////////////////
19
20 namespace boost
21 {
22     namespace range_detail
23     {
24         template< typename T >
25         struct range_size_type_
26         {
27             template< typename C >
28             struct pts
29             {
30                 typedef std::size_t type;
31             };
32         };
33
34         template<>
35         struct range_size_type_<std_container_>
36         {
37             template< typename C >
38             struct pts
39             {
40                 typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
41             };
42         };
43     }
44
45     template< typename C >
46     class range_size
47     {
48         typedef typename range_detail::range<C>::type c_type;
49     public:
50         typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type;
51     };
52 }
53
54 #endif
55