blob: 1444d062750653caff7f3e02094af34c217c178e [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
Jeff Thompson3d613fd2013-10-15 15:39:04 -070011#ifndef NDNBOOST_RANGE_DETAIL_SIZE_TYPE_HPP
12#define NDNBOOST_RANGE_DETAIL_SIZE_TYPE_HPP
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070013
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 {
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040 typedef NDNBOOST_RANGE_DEDUCED_TYPENAME C::size_type type;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070041 };
42 };
43 }
44
45 template< typename C >
46 class range_size
47 {
48 typedef typename range_detail::range<C>::type c_type;
49 public:
Jeff Thompson3d613fd2013-10-15 15:39:04 -070050 typedef typename range_detail::range_size_type_<c_type>::NDNBOOST_NESTED_TEMPLATE pts<C>::type type;
Jeff Thompsonef2d5a42013-08-22 19:09:24 -070051 };
52}
53
54#endif
55