Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:44:40

0001 // Copyright David Abrahams 2006. Distributed under the Boost
0002 // Software License, Version 1.0. (See accompanying
0003 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0004 #ifndef BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP
0005 # define BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP
0006 
0007 namespace boost { namespace concept_checking { 
0008 
0009 // Here we implement the "metafunction" that detects whether a
0010 // constraints metafunction exists
0011 typedef char yes;
0012 typedef char (&no)[2];
0013 
0014 template <class Model, void (Model::*)()>
0015 struct wrap_constraints {};
0016     
0017 template <class Model>
0018 inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
0019 inline no has_constraints_(...);
0020 
0021 template <class Model>
0022 struct has_constraints
0023 {
0024     BOOST_STATIC_CONSTANT(
0025         bool
0026       , value = sizeof( concept_checking::has_constraints_((Model*)0) ) == 1 );
0027 };
0028 
0029 }} // namespace boost::concept_checking
0030 
0031 #endif // BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP