forked from boostorg/iterator
Disabled default construction for iterator archetypes that are not forward traversal iterators
[SVN r21781]
This commit is contained in:
@ -36,6 +36,7 @@ test-suite iterator
|
||||
[ run iterator_adaptor_cc.cpp ]
|
||||
[ run iterator_adaptor_test.cpp ]
|
||||
[ compile iterator_archetype_cc.cpp ]
|
||||
[ compile-fail iterator_archetype_default_ctor.cpp ]
|
||||
[ run transform_iterator_test.cpp ]
|
||||
[ run indirect_iterator_test.cpp ]
|
||||
[ compile indirect_iterator_member_types.cpp ]
|
||||
|
22
test/iterator_archetype_default_ctor.cpp
Executable file
22
test/iterator_archetype_default_ctor.cpp
Executable file
@ -0,0 +1,22 @@
|
||||
//
|
||||
// Copyright Thomas Witt 2004. 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>
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef boost::iterator_archetype<
|
||||
int
|
||||
, boost::iterator_archetypes::readable_iterator_t
|
||||
, boost::single_pass_traversal_tag
|
||||
> iter;
|
||||
|
||||
// single_pass_traversal iterators are not required to be
|
||||
// default constructible
|
||||
iter it;
|
||||
}
|
Reference in New Issue
Block a user