Chris@16: // Copyright David Abrahams 2006. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying Chris@16: // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: #ifndef BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP Chris@16: # define BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP Chris@16: Chris@16: namespace boost { namespace concept_checking { Chris@16: Chris@16: // Here we implement the "metafunction" that detects whether a Chris@16: // constraints metafunction exists Chris@16: typedef char yes; Chris@16: typedef char (&no)[2]; Chris@16: Chris@16: template Chris@16: struct wrap_constraints {}; Chris@16: Chris@16: template Chris@16: inline yes has_constraints_(Model*, wrap_constraints* = 0); Chris@16: inline no has_constraints_(...); Chris@16: Chris@16: template Chris@16: struct has_constraints Chris@16: { Chris@16: BOOST_STATIC_CONSTANT( Chris@16: bool Chris@16: , value = sizeof( concept_checking::has_constraints_((Model*)0) ) == 1 ); Chris@16: }; Chris@16: Chris@16: }} // namespace boost::concept_checking Chris@16: Chris@16: #endif // BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP