1 // (C) Copyright Jeremy Siek 2000. 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 8 /* 9 10 This file verifies that the BOOST_CLASS_REQUIRE macro of the Boost 11 Concept Checking Library does not cause errors when it is not suppose 12 to. 13 14 */ 15 operator ()foo16struct foo { bool operator()(int) { return true; } }; operator ()bar17struct bar { bool operator()(int, char) { return true; } }; 18 19 class class_requires_test 20 { 21 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<int>)); 22 typedef int* int_ptr; typedef const int* const_int_ptr; 23 BOOST_CONCEPT_ASSERT((boost::EqualOp<int_ptr,const_int_ptr>)); 24 BOOST_CONCEPT_ASSERT((boost::UnaryFunction<foo,bool,int>)); 25 BOOST_CONCEPT_ASSERT((boost::BinaryFunction<bar,bool,int,char>)); 26 }; 27 28 int main()29main() 30 { 31 class_requires_test x; 32 boost::ignore_unused_variable_warning(x); 33 return 0; 34 } 35