| 1 | // Copyright 2021 Peter Dimov |
|---|---|
| 2 | // Distributed under the Boost Software License, Version 1.0. |
| 3 | // https://www.boost.org/LICENSE_1_0.txt |
| 4 | |
| 5 | #include <boost/lambda2.hpp> |
| 6 | #include <boost/core/lightweight_test.hpp> |
| 7 | |
| 8 | namespace N |
| 9 | { |
| 10 | struct Irrelevant {}; |
| 11 | void operator+( Irrelevant, Irrelevant ); |
| 12 | |
| 13 | int plus_one( int i ) |
| 14 | { |
| 15 | using namespace boost::lambda2; |
| 16 | return (_1 + 1)( i ); |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | int main() |
| 21 | { |
| 22 | BOOST_TEST_EQ( N::plus_one( 4 ), 5 ); |
| 23 | return boost::report_errors(); |
| 24 | } |
| 25 |
