]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/config/test/boost_no_std_oi_assign.ipp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / config / test / boost_no_std_oi_assign.ipp
1 // (C) Copyright John Maddock 2001.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 // See http://www.boost.org/libs/config for the most recent version.
7
8 // MACRO: BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
9 // TITLE: That the std output iterators are assignable
10 // DESCRIPTION: Some std lib output iterators are not assignable
11 // even this is required by the standard.
12
13 #include <iterator>
14 #include <list>
15 #include <iostream>
16
17
18 namespace boost_no_std_output_iterator_assign {
19
20 int test()
21 {
22 std::list<int> l;
23 std::back_insert_iterator<std::list<int> > bi1(l);
24 std::back_insert_iterator<std::list<int> > bi2(l);
25 bi1 = bi2;
26
27 std::front_insert_iterator<std::list<int> > fi1(l);
28 std::front_insert_iterator<std::list<int> > fi2(l);
29 fi1 = fi2;
30
31 std::ostream_iterator<char> osi1(std::cout);
32 std::ostream_iterator<char> osi2(std::cout);
33 osi1 = osi2;
34
35 return 0;
36 }
37
38 }
39
40
41
42