]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/foreach/test/misc.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / foreach / test / misc.cpp
1 // misc.cpp
2 //
3 // (C) Copyright Eric Niebler 2008.
4 // Use, modification and distribution are subject to the
5 // Boost Software License, Version 1.0. (See accompanying file
6 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7
8 /*
9 Revision history:
10 4 March 2008 : Initial version.
11 */
12
13 #include <vector>
14 #include <boost/test/minimal.hpp>
15 #include <boost/foreach.hpp>
16
17 struct xxx : std::vector<int>
18 {
19 virtual ~xxx() = 0;
20 };
21
22 void test_abstract(xxx& rng)
23 {
24 BOOST_FOREACH (int x, rng)
25 {
26 (void)x;
27 }
28 }
29
30 struct yyy : std::vector<int>
31 {
32 void test()
33 {
34 BOOST_FOREACH(int x, *this)
35 {
36 (void)x;
37 }
38 }
39 };
40
41 ///////////////////////////////////////////////////////////////////////////////
42 // test_main
43 //
44 int test_main( int, char*[] )
45 {
46 return 0;
47 }