annotate DEPENDENCIES/generic/include/boost/smart_ptr/detail/array_traits.hpp @ 125:34e428693f5d vext

Vext -> Repoint
author Chris Cannam
date Thu, 14 Jun 2018 11:15:39 +0100
parents c530137014c0
children
rev   line source
Chris@16 1 /*
Chris@101 2 * Copyright (c) 2012-2014 Glen Joseph Fernandes
Chris@16 3 * glenfe at live dot com
Chris@16 4 *
Chris@16 5 * Distributed under the Boost Software License,
Chris@16 6 * Version 1.0. (See accompanying file LICENSE_1_0.txt
Chris@16 7 * or copy at http://boost.org/LICENSE_1_0.txt)
Chris@16 8 */
Chris@16 9 #ifndef BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP
Chris@16 10 #define BOOST_SMART_PTR_DETAIL_ARRAY_TRAITS_HPP
Chris@16 11
Chris@16 12 #include <boost/type_traits/remove_cv.hpp>
Chris@16 13
Chris@16 14 namespace boost {
Chris@16 15 namespace detail {
Chris@101 16 template<class T>
Chris@16 17 struct array_base {
Chris@16 18 typedef typename boost::remove_cv<T>::type type;
Chris@16 19 };
Chris@101 20
Chris@101 21 template<class T>
Chris@16 22 struct array_base<T[]> {
Chris@16 23 typedef typename array_base<T>::type type;
Chris@16 24 };
Chris@101 25
Chris@101 26 template<class T, std::size_t N>
Chris@16 27 struct array_base<T[N]> {
Chris@16 28 typedef typename array_base<T>::type type;
Chris@16 29 };
Chris@101 30
Chris@101 31 template<class T>
Chris@16 32 struct array_total {
Chris@16 33 enum {
Chris@16 34 size = 1
Chris@16 35 };
Chris@16 36 };
Chris@101 37
Chris@101 38 template<class T, std::size_t N>
Chris@16 39 struct array_total<T[N]> {
Chris@16 40 enum {
Chris@16 41 size = N * array_total<T>::size
Chris@16 42 };
Chris@16 43 };
Chris@101 44
Chris@101 45 template<class T>
Chris@16 46 struct array_inner;
Chris@101 47
Chris@101 48 template<class T>
Chris@16 49 struct array_inner<T[]> {
Chris@16 50 typedef T type;
Chris@16 51 };
Chris@101 52
Chris@101 53 template<class T, std::size_t N>
Chris@16 54 struct array_inner<T[N]> {
Chris@16 55 typedef T type;
Chris@16 56 };
Chris@16 57 }
Chris@16 58 }
Chris@16 59
Chris@16 60 #endif