]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/concept_check/include/boost/concept_check/has_constraints.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / concept_check / include / boost / concept_check / has_constraints.hpp
CommitLineData
7c673cae
FG
1// Copyright David Abrahams 2006. Distributed under the Boost
2// Software License, Version 1.0. (See accompanying
3// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4#ifndef BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP
5# define BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP
6
7namespace boost { namespace concept_checking {
8
9// Here we implement the "metafunction" that detects whether a
10// constraints metafunction exists
11typedef char yes;
12typedef char (&no)[2];
13
14template <class Model, void (Model::*)()>
15struct wrap_constraints {};
16
17template <class Model>
18inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
19inline no has_constraints_(...);
20
21template <class Model>
22struct has_constraints
23{
24 BOOST_STATIC_CONSTANT(
25 bool
26 , value = sizeof( concept_checking::has_constraints_((Model*)0) ) == 1 );
27};
28
29}} // namespace boost::concept_checking
30
31#endif // BOOST_CONCEPT_CHECK_HAS_CONSTRAINTS_DWA2006429_HPP