Mercurial > hg > vamp-build-and-test
annotate DEPENDENCIES/generic/include/boost/parameter/aux_/template_keyword.hpp @ 125:34e428693f5d vext
Vext -> Repoint
author | Chris Cannam |
---|---|
date | Thu, 14 Jun 2018 11:15:39 +0100 |
parents | 2665513ce2d3 |
children |
rev | line source |
---|---|
Chris@16 | 1 // Copyright Daniel Wallin 2006. Use, modification and distribution is |
Chris@16 | 2 // subject to the Boost Software License, Version 1.0. (See accompanying |
Chris@16 | 3 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
Chris@16 | 4 |
Chris@16 | 5 #ifndef BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP |
Chris@16 | 6 # define BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP |
Chris@16 | 7 |
Chris@16 | 8 # include <boost/mpl/and.hpp> |
Chris@16 | 9 # include <boost/mpl/not.hpp> |
Chris@16 | 10 # include <boost/type_traits/is_convertible.hpp> |
Chris@16 | 11 # include <boost/type_traits/is_reference.hpp> |
Chris@16 | 12 |
Chris@16 | 13 namespace boost { namespace parameter { |
Chris@16 | 14 |
Chris@16 | 15 namespace aux |
Chris@16 | 16 { |
Chris@16 | 17 |
Chris@16 | 18 struct template_keyword_tag {}; |
Chris@16 | 19 |
Chris@16 | 20 template <class T, class U> |
Chris@16 | 21 struct is_pointer_convertible |
Chris@16 | 22 : is_convertible<T*, U*> |
Chris@16 | 23 {}; |
Chris@16 | 24 |
Chris@16 | 25 template <class T> |
Chris@16 | 26 struct is_template_keyword |
Chris@16 | 27 : mpl::and_< |
Chris@16 | 28 mpl::not_<is_reference<T> > |
Chris@16 | 29 , is_pointer_convertible<T, template_keyword_tag> |
Chris@16 | 30 > |
Chris@16 | 31 {}; |
Chris@16 | 32 |
Chris@16 | 33 } // namespace aux |
Chris@16 | 34 |
Chris@16 | 35 template <class Tag, class T> |
Chris@16 | 36 struct template_keyword |
Chris@16 | 37 : aux::template_keyword_tag |
Chris@16 | 38 { |
Chris@16 | 39 typedef Tag key_type; |
Chris@16 | 40 typedef T value_type; |
Chris@16 | 41 typedef value_type reference; |
Chris@16 | 42 }; |
Chris@16 | 43 |
Chris@16 | 44 }} // namespace boost::parameter |
Chris@16 | 45 |
Chris@16 | 46 #endif // BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP |
Chris@16 | 47 |