1 /*============================================================================= 2 Copyright (c) 2010 Christopher Schmidt 3 4 Distributed under the Boost Software License, Version 1.0. (See accompanying 5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 ==============================================================================*/ 7 8 #ifndef BOOST_FUSION_ADAPTED_ARRAY_TAG_OF_HPP 9 #define BOOST_FUSION_ADAPTED_ARRAY_TAG_OF_HPP 10 11 #include <boost/fusion/support/config.hpp> 12 #include <boost/fusion/support/tag_of_fwd.hpp> 13 #include <cstddef> 14 15 namespace boost 16 { 17 namespace fusion 18 { 19 struct po_array_tag; 20 struct po_array_iterator_tag; 21 struct random_access_traversal_tag; 22 struct fusion_sequence_tag; 23 24 namespace traits 25 { 26 #ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS 27 template<typename T, std::size_t N> 28 struct tag_of<T[N], void> 29 { 30 typedef po_array_tag type; 31 }; 32 33 template<typename T, std::size_t N> 34 struct tag_of<T const[N], void> 35 { 36 typedef po_array_tag type; 37 }; 38 #else 39 template<typename T, std::size_t N> 40 struct tag_of<T[N], void> 41 { 42 typedef po_array_tag type; 43 }; 44 45 template<typename T, std::size_t N> 46 struct tag_of<T const[N], void> 47 { 48 typedef po_array_tag type; 49 }; 50 #endif 51 } 52 } 53 54 namespace mpl 55 { 56 template<typename> 57 struct sequence_tag; 58 59 template<typename T, std::size_t N> 60 struct sequence_tag<T[N]> 61 { 62 typedef fusion::po_array_tag type; 63 }; 64 65 template<typename T, std::size_t N> 66 struct sequence_tag<T const[N] > 67 { 68 typedef fusion::po_array_tag type; 69 }; 70 } 71 } 72 73 #endif 74