changed to new non-macro style, so don't need different 1..4

arguments versions


[SVN r8277]
This commit is contained in:
Jeremy Siek
2000-11-21 20:16:55 +00:00
parent be077fe131
commit 094da4b2f6
10 changed files with 32 additions and 185 deletions
+11 -9
View File
@@ -8,23 +8,25 @@
/*
This file verifies that the BOOST_CLASS_REQUIRES macros of the
Boost Concept Checking Library do not cause errors when
they are not suppose to.
This file verifies that the boost::class_requires class of the Boost
Concept Checking Library do not cause errors when it is not suppose
to.
*/
struct foo { bool operator()(int) { return true; } };
struct bar { bool operator()(int, char) { return true; } };
using namespace boost;
class class_requires_test
{
BOOST_CLASS_REQUIRES(int, EqualityComparableConcept);
typedef int* int_ptr;
typedef const int* const_int_ptr;
BOOST_CLASS_REQUIRES2(int_ptr, const_int_ptr, Comparable2Concept);
BOOST_CLASS_REQUIRES3(foo, bool, int, UnaryFunctionConcept);
BOOST_CLASS_REQUIRES4(bar, bool, int, char, BinaryFunctionConcept);
typedef class_requires< EqualityComparableConcept<int> >::check req1;
typedef class_requires<EqualityComparableConcept<int> >::check req2;
typedef class_requires<Comparable2Concept<int*, const int*> >::check req3;
typedef class_requires<UnaryFunctionConcept<foo, bool, int> >::check req4;
typedef class_requires<BinaryFunctionConcept<bar, bool, int, char> >::check
req5;
};
int