diff --git a/include/boost/concept_check.hpp b/include/boost/concept_check.hpp index b75364f..353171a 100644 --- a/include/boost/concept_check.hpp +++ b/include/boost/concept_check.hpp @@ -429,6 +429,61 @@ struct require_same { typedef T type; }; Second b; }; + template + struct AdaptableGeneratorConcept + { + void constraints() { + typedef typename Func::result_type result_type; + BOOST_STATIC_ASSERT((is_convertible::value)); + function_requires< GeneratorConcept >(); + } + }; + + template + struct AdaptableUnaryFunctionConcept + { + void constraints() { + typedef typename Func::argument_type argument_type; + typedef typename Func::result_type result_type; + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_convertible::value)); + function_requires< UnaryFunctionConcept >(); + } + }; + + template + struct AdaptableBinaryFunctionConcept + { + void constraints() { + typedef typename Func::first_argument_type first_argument_type; + typedef typename Func::second_argument_type second_argument_type; + typedef typename Func::result_type result_type; + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_convertible::value)); + BOOST_STATIC_ASSERT((is_convertible::value)); + function_requires< BinaryFunctionConcept >(); + } + }; + + template + struct AdaptablePredicateConcept + { + void constraints() { + function_requires< UnaryPredicateConcept >(); + function_requires< AdaptableUnaryFunctionConcept >(); + } + }; + + template + struct AdaptableBinaryPredicateConcept + { + void constraints() { + function_requires< BinaryPredicateConcept >(); + function_requires< AdaptableBinaryFunctionConcept >(); + } + }; + //=========================================================================== // Iterator Concepts