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)
6 #include <boost/concept_check.hpp>
7 #include "old_concepts.hpp"
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.
15 struct foo
{ bool operator()(int) { return true; } };
16 struct bar
{ bool operator()(int, char) { return true; } };
19 class class_requires_test
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
);
31 class_requires_test x
;
32 boost::ignore_unused_variable_warning(x
);