annotate DEPENDENCIES/generic/include/boost/concept_check/has_constraints.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 David Abrahams 2006. Distributed under the Boost
Chris@16 2 // 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 #ifndef BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP
Chris@16 5 # define BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP
Chris@16 6
Chris@16 7 namespace boost { namespace concept_checking {
Chris@16 8
Chris@16 9 // Here we implement the "metafunction" that detects whether a
Chris@16 10 // constraints metafunction exists
Chris@16 11 typedef char yes;
Chris@16 12 typedef char (&no)[2];
Chris@16 13
Chris@16 14 template <class Model, void (Model::*)()>
Chris@16 15 struct wrap_constraints {};
Chris@16 16
Chris@16 17 template <class Model>
Chris@16 18 inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
Chris@16 19 inline no has_constraints_(...);
Chris@16 20
Chris@16 21 template <class Model>
Chris@16 22 struct has_constraints
Chris@16 23 {
Chris@16 24 BOOST_STATIC_CONSTANT(
Chris@16 25 bool
Chris@16 26 , value = sizeof( concept_checking::has_constraints_((Model*)0) ) == 1 );
Chris@16 27 };
Chris@16 28
Chris@16 29 }} // namespace boost::concept_checking
Chris@16 30
Chris@16 31 #endif // BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP