]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/range/test/iterator_range_equality_bug.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / range / test / iterator_range_equality_bug.cpp
1 // Boost.Range library
2 //
3 // Copyright Neil Groves 2014. Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7 //
8 //
9 // For more information, see http://www.boost.org/libs/range/
10 //
11 // As reported in https://groups.google.com/forum/#!msg/boost-developers-archive/6JVNg7ZPb4k/RAlvPUec4MAJ
12
13 #include <boost/range/iterator_range_core.hpp>
14 #include <boost/lambda/lambda.hpp>
15 #include <boost/algorithm/string.hpp>
16
17 namespace boost
18 {
19 enum {unnamed};
20 struct S {
21 bool operator<(int) const {return false;}
22 bool operator==(int) const {return false;}
23 };
24 template<typename T>
25 bool foo(T i)
26 {
27 return i < unnamed || i == unnamed;
28 }
29 }
30
31 int main()
32 {
33 using boost::lambda::_1;
34 (void)(_1 == 42);
35 (void)(42 == _1);
36
37 boost::foo(42);
38 boost::foo(boost::S());
39 }