| 1 | // Copyright 2017, 2020 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/bind.hpp> |
| 6 | #include <boost/core/lightweight_test.hpp> |
| 7 | |
| 8 | // |
| 9 | |
| 10 | int f( int a, int b, int c ) |
| 11 | { |
| 12 | return a + 10 * b + 100 * c; |
| 13 | } |
| 14 | |
| 15 | int main() |
| 16 | { |
| 17 | int const i = 1; |
| 18 | |
| 19 | BOOST_TEST_EQ( boost::bind( f, _1, 2, _2 )( i, 3 ), 321 ); |
| 20 | |
| 21 | return boost::report_errors(); |
| 22 | } |
| 23 |
