forked from boostorg/concept_check
changed to new non-macro style, so don't need different 1..4
arguments versions [SVN r8277]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user