2006-04-29 20:27:14 +00:00
|
|
|
// (C) Copyright Jeremy Siek, David Abrahams 2000-2006.
|
2004-07-26 00:32:12 +00:00
|
|
|
// Distributed under the Boost Software License, Version 1.0. (See
|
|
|
|
|
// accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
2001-01-21 05:33:10 +00:00
|
|
|
//
|
|
|
|
|
// Change Log:
|
|
|
|
|
// 20 Jan 2001 - Added warning suppression (David Abrahams)
|
2000-12-09 15:24:02 +00:00
|
|
|
|
2000-12-09 15:32:00 +00:00
|
|
|
#include <boost/concept_check.hpp>
|
2000-12-09 15:24:02 +00:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
|
|
This file verifies that class_requires of the Boost Concept Checking
|
2006-04-29 20:27:14 +00:00
|
|
|
Library catches errors when it is supposed to.
|
2000-12-09 15:24:02 +00:00
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
struct foo { };
|
|
|
|
|
|
2006-04-29 20:27:14 +00:00
|
|
|
template <class T>
|
2000-12-09 15:24:02 +00:00
|
|
|
class class_requires_test
|
|
|
|
|
{
|
2006-05-01 19:40:32 +00:00
|
|
|
BOOST_CONCEPT_ASSERT((boost::EqualityComparable<foo>));
|
2000-12-09 15:24:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
main()
|
|
|
|
|
{
|
2006-04-29 20:27:14 +00:00
|
|
|
class_requires_test<int> x;
|
|
|
|
|
(void)x; // suppress unused variable warning
|
|
|
|
|
return 0;
|
2000-12-09 15:24:02 +00:00
|
|
|
}
|