mirror of
https://github.com/boostorg/iterator.git
synced 2026-01-29 09:40:07 +01:00
Interoperability tests added.
[SVN r704]
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
// to its suitability for any purpose.
|
||||
|
||||
// Revision History
|
||||
// 22 Nov 2002 Thomas Witt
|
||||
// Added interoperability check.
|
||||
// 28 Oct 2002 Jeremy Siek
|
||||
// Updated for new iterator adaptors.
|
||||
// 08 Mar 2001 Jeremy Siek
|
||||
@@ -15,8 +17,10 @@
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <boost/iterator/iterator_adaptors.hpp>
|
||||
#include <boost/iterator/iterator_concepts.hpp>
|
||||
#include <boost/iterator/new_iterator_tests.hpp>
|
||||
#include <boost/pending/iterator_tests.hpp>
|
||||
#include <boost/concept_check.hpp>
|
||||
|
||||
struct mult_functor {
|
||||
typedef int result_type;
|
||||
@@ -36,6 +40,14 @@ main()
|
||||
{
|
||||
const int N = 10;
|
||||
|
||||
// Concept checks
|
||||
{
|
||||
typedef boost::transform_iterator<mult_functor, int*> iter_t;
|
||||
typedef boost::transform_iterator<mult_functor, int const*> c_iter_t;
|
||||
|
||||
boost::function_requires< boost_concepts::InteroperableConcept<iter_t, c_iter_t> >();
|
||||
}
|
||||
|
||||
// Test transform_iterator
|
||||
{
|
||||
int x[N], y[N];
|
||||
|
||||
Reference in New Issue
Block a user