source: vendor/nemo/current/NEMOGCM/EXTERNAL/XIOS/extern/boost/include/boost/range/detail/size_type.hpp @ 44

Last change on this file since 44 was 44, checked in by cholod, 12 years ago

Load NEMO_TMP into vendor/nemo/current.

File size: 1.7 KB
Line 
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
20namespace boost
21{
22    namespace range_detail
23    {       
24        template< typename T >
25        struct range_size_type_;
26
27        template<>
28        struct range_size_type_<std_container_>
29        {
30            template< typename C >
31            struct pts
32            {
33                typedef BOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
34            };
35        };
36
37        template<>
38        struct range_size_type_<std_pair_>
39        {
40            template< typename P >
41            struct pts
42            {
43                typedef std::size_t type;
44            };
45        };
46
47        template<>
48        struct range_size_type_<array_>
49        {
50            template< typename A >
51            struct pts
52            {
53                typedef std::size_t type;
54            };
55        };
56
57 
58    } 
59   
60    template< typename C >
61    class range_size
62    {
63        typedef typename range_detail::range<C>::type c_type;
64    public:
65        typedef typename range_detail::range_size_type_<c_type>::BOOST_NESTED_TEMPLATE pts<C>::type type; 
66    };
67}
68
69#endif
70
Note: See TracBrowser for help on using the repository browser.