summaryrefslogtreecommitdiff
path: root/src/third_party/boost-1.56.0/libs/utility/generator_iterator_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/boost-1.56.0/libs/utility/generator_iterator_test.cpp')
-rw-r--r--src/third_party/boost-1.56.0/libs/utility/generator_iterator_test.cpp63
1 files changed, 0 insertions, 63 deletions
diff --git a/src/third_party/boost-1.56.0/libs/utility/generator_iterator_test.cpp b/src/third_party/boost-1.56.0/libs/utility/generator_iterator_test.cpp
deleted file mode 100644
index 1c7a1104071..00000000000
--- a/src/third_party/boost-1.56.0/libs/utility/generator_iterator_test.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-//
-// Copyright 2014 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-//
-
-#include <boost/generator_iterator.hpp>
-#include <boost/detail/lightweight_test.hpp>
-#include <algorithm>
-
-class X
-{
-private:
-
- int v;
-
-public:
-
- typedef int result_type;
-
- X(): v( 0 )
- {
- }
-
- int operator()()
- {
- return ++v;
- }
-};
-
-template<class InputIterator, class Size, class OutputIterator> OutputIterator copy_n( InputIterator first, Size n, OutputIterator result )
-{
- while( n-- > 0 )
- {
- *result++ = *first++;
- }
-
- return result;
-}
-
-void copy_test()
-{
- X x;
- boost::generator_iterator<X> in( &x );
-
- int const N = 4;
- int v[ N ] = { 0 };
-
- ::copy_n( in, 4, v );
-
- BOOST_TEST_EQ( v[0], 1 );
- BOOST_TEST_EQ( v[1], 2 );
- BOOST_TEST_EQ( v[2], 3 );
- BOOST_TEST_EQ( v[3], 4 );
-}
-
-int main()
-{
- copy_test();
- return boost::report_errors();
-}