added tons of functions to stl_concept_covering.cpp

[SVN r8359]
This commit is contained in:
Jeremy Siek committed 2000-11-30 02:49:31 +00:00
1 parent 1dd9469a40
commit 92306b4a19
3 files changed
+511 -102

No files matched your search

+101 -8
View File
@@ -21,17 +21,24 @@ int
main()
{
using namespace boost;
//===========================================================================
// Basic Concepts
{
typedef default_constructible_archetype<> foo;
function_requires< DefaultConstructibleConcept<foo> >();
}
{
typedef assignable_archetype<> foo;
function_requires< AssignableConcept<foo> >();
}
{
typedef copy_constructible_archetype<> foo;
function_requires< CopyConstructibleConcept<foo> >();
}
{
typedef assignable_archetype<> foo;
function_requires< AssignableConcept<foo> >();
typedef sgi_assignable_archetype<> foo;
function_requires< SGIAssignableConcept<foo> >();
}
{
typedef copy_constructible_archetype<> foo;
@@ -41,6 +48,66 @@ main()
{
function_requires< ConvertibleConcept<boolean_archetype, bool> >();
}
{
typedef equality_comparable_archetype<> foo;
function_requires< EqualityComparableConcept<foo> >();
}
{
typedef less_than_comparable_archetype<> foo;
function_requires< LessThanComparableConcept<foo> >();
}
{
typedef comparable_archetype<> foo;
function_requires< ComparableConcept<foo> >();
}
{
typedef equal_op_first_archetype<> First;
typedef equal_op_second_archetype<> Second;
function_requires< EqualOpConcept<First, Second> >();
}
{
typedef not_equal_op_first_archetype<> First;
typedef not_equal_op_second_archetype<> Second;
function_requires< NotEqualOpConcept<First, Second> >();
}
{
typedef less_than_op_first_archetype<> First;
typedef less_than_op_second_archetype<> Second;
function_requires< LessThanOpConcept<First, Second> >();
}
{
typedef less_equal_op_first_archetype<> First;
typedef less_equal_op_second_archetype<> Second;
function_requires< LessEqualOpConcept<First, Second> >();
}
{
typedef greater_than_op_first_archetype<> First;
typedef greater_than_op_second_archetype<> Second;
function_requires< GreaterThanOpConcept<First, Second> >();
}
{
typedef greater_equal_op_first_archetype<> First;
typedef greater_equal_op_second_archetype<> Second;
function_requires< GreaterEqualOpConcept<First, Second> >();
}
{
typedef copy_constructible_archetype<> Return;
typedef plus_op_first_archetype<Return> First;
typedef plus_op_second_archetype<Return> Second;
function_requires< PlusOpConcept<Return, First, Second> >();
}
//===========================================================================
// Function Object Concepts
{
typedef generator_archetype<null_archetype<> > foo;
function_requires< GeneratorConcept<foo, null_archetype<> > >();
}
{
function_requires< GeneratorConcept< void_generator_archetype, void > >();
}
{
typedef unary_function_archetype<int, int> F;
function_requires< UnaryFunctionConcept<F, int, int> >();
@@ -59,16 +126,19 @@ main()
typedef const_binary_predicate_archetype<int, int> const_F;
function_requires< Const_BinaryPredicateConcept<const_F, int, int> >();
}
//===========================================================================
// Iterator Concepts
{
typedef trivial_iterator_archetype<null_archetype> Iter;
typedef trivial_iterator_archetype<null_archetype<> > Iter;
function_requires< TrivialIteratorConcept<Iter> >();
}
{
typedef mutable_trivial_iterator_archetype<null_archetype> Iter;
typedef mutable_trivial_iterator_archetype<null_archetype<> > Iter;
function_requires< Mutable_TrivialIteratorConcept<Iter> >();
}
{
typedef input_iterator_archetype<null_archetype> Iter;
typedef input_iterator_archetype<null_archetype<> > Iter;
function_requires< InputIteratorConcept<Iter> >();
}
{
@@ -76,17 +146,40 @@ main()
function_requires< OutputIteratorConcept<Iter, int> >();
}
{
typedef forward_iterator_archetype<null_archetype> Iter;
typedef forward_iterator_archetype<null_archetype<> > Iter;
function_requires< ForwardIteratorConcept<Iter> >();
}
{
typedef bidirectional_iterator_archetype<null_archetype> Iter;
typedef forward_iterator_archetype<assignable_archetype<> > Iter;
function_requires< Mutable_ForwardIteratorConcept<Iter> >();
}
{
typedef bidirectional_iterator_archetype<null_archetype<> > Iter;
function_requires< BidirectionalIteratorConcept<Iter> >();
}
{
typedef random_access_iterator_archetype<null_archetype> Iter;
typedef bidirectional_iterator_archetype<assignable_archetype<> > Iter;
function_requires< Mutable_BidirectionalIteratorConcept<Iter> >();
}
{
typedef random_access_iterator_archetype<null_archetype<> > Iter;
function_requires< RandomAccessIteratorConcept<Iter> >();
}
{
typedef random_access_iterator_archetype<assignable_archetype<> > Iter;
function_requires< Mutable_RandomAccessIteratorConcept<Iter> >();
}
//===========================================================================
// Container Concepts
{
function_requires< ContainerConcept< > >();
}
{
}
return 0;
}