// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify, // sell and distribute this software is granted provided this // copyright notice appears in all copies. This software is provided // "as is" without express or implied warranty, and with no claim as // to its suitability for any purpose. #include #include /* This file verifies that the BOOST_FUNCTION_REQUIRES macros of the Boost Concept Checking Library do not cause errors when they are not suppose to and verifies that the concept archetypes meet the requirements of their matching concepts. */ int main() { using namespace boost; { typedef default_constructible_archetype<> foo; function_requires< DefaultConstructibleConcept >(); } { typedef copy_constructible_archetype<> foo; function_requires< CopyConstructibleConcept >(); } { typedef assignable_archetype<> foo; function_requires< AssignableConcept >(); } { typedef copy_constructible_archetype<> foo; typedef convertible_to_archetype convertible_to_foo; function_requires< ConvertibleConcept >(); } { function_requires< ConvertibleConcept >(); } { typedef unary_function_archetype F; function_requires< UnaryFunctionConcept >(); } { typedef binary_function_archetype F; function_requires< BinaryFunctionConcept >(); } { typedef unary_predicate_archetype F; function_requires< UnaryPredicateConcept >(); } { typedef binary_predicate_archetype F; function_requires< BinaryPredicateConcept >(); typedef const_binary_predicate_archetype const_F; function_requires< Const_BinaryPredicateConcept >(); } { typedef trivial_iterator_archetype Iter; function_requires< TrivialIteratorConcept >(); } { typedef mutable_trivial_iterator_archetype Iter; function_requires< Mutable_TrivialIteratorConcept >(); } { typedef input_iterator_archetype Iter; function_requires< InputIteratorConcept >(); } { typedef output_iterator_archetype Iter; function_requires< OutputIteratorConcept >(); } { typedef forward_iterator_archetype Iter; function_requires< ForwardIteratorConcept >(); } { typedef bidirectional_iterator_archetype Iter; function_requires< BidirectionalIteratorConcept >(); } { typedef random_access_iterator_archetype Iter; function_requires< RandomAccessIteratorConcept >(); } return 0; }