]>
Commit | Line | Data |
---|---|---|
b32b8144 | 1 | // |
f67539c2 | 2 | // quick.cpp - a quick test for boost/bind/bind.hpp |
b32b8144 FG |
3 | // |
4 | // Copyright 2017 Peter Dimov | |
5 | // | |
6 | // Distributed under the Boost Software License, Version 1.0. | |
7 | // | |
8 | // See accompanying file LICENSE_1_0.txt or copy at | |
9 | // http://www.boost.org/LICENSE_1_0.txt | |
10 | // | |
11 | ||
f67539c2 | 12 | #include <boost/bind/bind.hpp> |
b32b8144 FG |
13 | #include <boost/core/lightweight_test.hpp> |
14 | ||
f67539c2 TL |
15 | using namespace boost::placeholders; |
16 | ||
17 | // | |
18 | ||
b32b8144 FG |
19 | int f( int a, int b, int c ) |
20 | { | |
21 | return a + 10 * b + 100 * c; | |
22 | } | |
23 | ||
24 | int main() | |
25 | { | |
26 | int const i = 1; | |
27 | ||
28 | BOOST_TEST_EQ( boost::bind( f, _1, 2, 3 )( i ), 321 ); | |
29 | ||
30 | return boost::report_errors(); | |
31 | } |