1 // (C) Copyright Jeremy Siek, David Abrahams 2000-2006.
2 // Distributed under the Boost Software License, Version 1.0. (See
3 // accompanying file LICENSE_1_0.txt or copy at
4 // http://www.boost.org/LICENSE_1_0.txt)
5 
6 #include <boost/concept_check.hpp>
7 #include "old_concepts.hpp"
8 
9 // This test verifies that use of the old-style concept checking
10 // classes still compiles (but not that it detects constraint
11 // violations).  We check them with the old-style macros just for
12 // completeness, since those macros stranslate into
13 // BOOST_CONCEPT_ASSERTs.
14 
operator ()foo15 struct foo { bool operator()(int) { return true; } };
operator ()bar16 struct bar { bool operator()(int, char) { return true; } };
17 
18 
19 class class_requires_test
20 {
21   BOOST_CLASS_REQUIRE(int, old, EqualityComparableConcept);
22   typedef int* int_ptr; typedef const int* const_int_ptr;
23   BOOST_CLASS_REQUIRE2(int_ptr, const_int_ptr, old, EqualOpConcept);
24   BOOST_CLASS_REQUIRE3(foo, bool, int, old, UnaryFunctionConcept);
25   BOOST_CLASS_REQUIRE4(bar, bool, int, char, old, BinaryFunctionConcept);
26 };
27 
28 int
main()29 main()
30 {
31     class_requires_test x;
32     boost::ignore_unused_variable_warning(x);
33     return 0;
34 }
35