forked from boostorg/iterator
Added first archetype test.
[SVN r1232]
This commit is contained in:
@@ -4,6 +4,7 @@ run unit_tests.cpp ;
|
|||||||
run concept_tests.cpp ;
|
run concept_tests.cpp ;
|
||||||
run iterator_adaptor_cc.cpp ;
|
run iterator_adaptor_cc.cpp ;
|
||||||
run iterator_adaptor_test.cpp ;
|
run iterator_adaptor_test.cpp ;
|
||||||
|
compile iterator_archetype_cc.cpp ;
|
||||||
run transform_iterator_test.cpp ;
|
run transform_iterator_test.cpp ;
|
||||||
run indirect_iterator_test.cpp ;
|
run indirect_iterator_test.cpp ;
|
||||||
run filter_iterator_test.cpp ;
|
run filter_iterator_test.cpp ;
|
||||||
|
25
test/iterator_archetype_cc.cpp
Normal file
25
test/iterator_archetype_cc.cpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// Copyright Thomas Witt 2003. Permission to copy, use,
|
||||||
|
// modify, sell and distribute this software is granted provided this
|
||||||
|
// copyright notice appears in all copies. This software is provided
|
||||||
|
// "as is" without express or implied warranty, and with no claim as
|
||||||
|
// to its suitability for any purpose.
|
||||||
|
//
|
||||||
|
#include <boost/iterator/iterator_archetypes.hpp>
|
||||||
|
#include <boost/iterator/iterator_categories.hpp>
|
||||||
|
#include <boost/iterator/iterator_concepts.hpp>
|
||||||
|
#include <boost/concept_check.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
typedef boost::iterator_archetype<int,
|
||||||
|
boost::writable_lvalue_iterator_tag,
|
||||||
|
boost::random_access_traversal_tag> iter;
|
||||||
|
|
||||||
|
boost::function_requires< boost_concepts::WritableLvalueIteratorConcept<iter> >();
|
||||||
|
boost::function_requires< boost_concepts::RandomAccessTraversalConcept<iter> >();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user