forked from boostorg/iterator
Added failure checks.
[SVN r754]
This commit is contained in:
@@ -3,3 +3,5 @@ include testing.jam ;
|
|||||||
run iterator_adaptor_cc.cpp ;
|
run iterator_adaptor_cc.cpp ;
|
||||||
run transform_iterator_test.cpp ;
|
run transform_iterator_test.cpp ;
|
||||||
run indirect_iterator_test.cpp ;
|
run indirect_iterator_test.cpp ;
|
||||||
|
compile-fail interoperable_fail.cpp ;
|
||||||
|
compile-fail is_convertible_fail.cpp ;
|
16
test/interoperable_fail.cpp
Normal file
16
test/interoperable_fail.cpp
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#include <boost/iterator/iterator_adaptors.hpp>
|
||||||
|
#include <boost/concept_check.hpp>
|
||||||
|
#include <boost/cstdlib.hpp>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
typedef boost::reverse_iterator<std::list<int*>::iterator> rev_iter;
|
||||||
|
typedef boost::indirect_iterator<std::list<int*>::iterator> ind_iter;
|
||||||
|
|
||||||
|
ind_iter() == rev_iter();
|
||||||
|
}
|
||||||
|
|
||||||
|
return boost::exit_success;
|
||||||
|
}
|
15
test/is_convertible_fail.cpp
Normal file
15
test/is_convertible_fail.cpp
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#include <boost/iterator/iterator_adaptors.hpp>
|
||||||
|
#include <boost/static_assert.hpp>
|
||||||
|
#include <boost/cstdlib.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
typedef boost::reverse_iterator<int*> rev_iter1;
|
||||||
|
typedef boost::reverse_iterator<char*> rev_iter2;
|
||||||
|
|
||||||
|
BOOST_STATIC_ASSERT((boost::is_convertible<rev_iter1, rev_iter2>::value));
|
||||||
|
}
|
||||||
|
|
||||||
|
return boost::exit_success;
|
||||||
|
}
|
Reference in New Issue
Block a user