blob: 331492255dc18bef4a3f5a2459509b8cda417562 [file] [log] [blame]
Jeff Thompsonef2d5a42013-08-22 19:09:24 -07001// 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 <ndnboost/range/detail/common.hpp>
15
16//////////////////////////////////////////////////////////////////////////////
17// missing partial specialization workaround.
18//////////////////////////////////////////////////////////////////////////////
19
20namespace ndnboost
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