• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 {
operator <boost::S21         bool operator<(int) const {return false;}
operator ==boost::S22         bool operator==(int) const {return false;}
23     };
24     template<typename T>
foo(T i)25     bool foo(T i)
26     {
27         return i < unnamed || i == unnamed;
28     }
29 }
30 
main()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 }
40