WSJT-X/libs/range/test/iterator_range_equality_bug.cpp
Bill Somerville 4ebe6417a5 Squashed 'boost/' content from commit b4feb19f2
git-subtree-dir: boost
git-subtree-split: b4feb19f287ee92d87a9624b5d36b7cf46aeadeb
2018-06-09 21:48:32 +01:00

40 lines
948 B
C++

// Boost.Range library
//
// Copyright Neil Groves 2014. Use, modification and
// distribution is subject to 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)
//
//
// For more information, see http://www.boost.org/libs/range/
//
// As reported in https://groups.google.com/forum/#!msg/boost-developers-archive/6JVNg7ZPb4k/RAlvPUec4MAJ
#include <boost/range/iterator_range_core.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/algorithm/string.hpp>
namespace boost
{
enum {unnamed};
struct S {
bool operator<(int) const {return false;}
bool operator==(int) const {return false;}
};
template<typename T>
bool foo(T i)
{
return i < unnamed || i == unnamed;
}
}
int main()
{
using boost::lambda::_1;
(void)(_1 == 42);
(void)(42 == _1);
boost::foo(42);
boost::foo(boost::S());
}