]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #include <boost/config.hpp> |
2 | ||
3 | #if defined(BOOST_MSVC) | |
4 | #pragma warning(disable: 4786) // identifier truncated in debug info | |
5 | #pragma warning(disable: 4710) // function not inlined | |
6 | #pragma warning(disable: 4711) // function selected for automatic inline expansion | |
7 | #pragma warning(disable: 4514) // unreferenced inline removed | |
8 | #endif | |
9 | ||
10 | // ref_fn_test.cpp: ref( f ) | |
11 | // | |
12 | // Copyright (c) 2008 Peter Dimov | |
13 | // | |
14 | // Distributed under the Boost Software License, Version 1.0. | |
15 | // See accompanying file LICENSE_1_0.txt or copy at | |
16 | // http://www.boost.org/LICENSE_1_0.txt | |
17 | ||
18 | #include <boost/ref.hpp> | |
f67539c2 | 19 | #include <boost/core/lightweight_test.hpp> |
7c673cae FG |
20 | |
21 | ||
22 | void f0() | |
23 | { | |
24 | } | |
25 | ||
26 | void f1(int) | |
27 | { | |
28 | } | |
29 | ||
30 | void f2(int, int) | |
31 | { | |
32 | } | |
33 | ||
34 | void f3(int, int, int) | |
35 | { | |
36 | } | |
37 | ||
38 | void f4(int, int, int, int) | |
39 | { | |
40 | } | |
41 | ||
42 | void f5(int, int, int, int, int) | |
43 | { | |
44 | } | |
45 | ||
46 | void f6(int, int, int, int, int, int) | |
47 | { | |
48 | } | |
49 | ||
50 | void f7(int, int, int, int, int, int, int) | |
51 | { | |
52 | } | |
53 | ||
54 | void f8(int, int, int, int, int, int, int, int) | |
55 | { | |
56 | } | |
57 | ||
58 | void f9(int, int, int, int, int, int, int, int, int) | |
59 | { | |
60 | } | |
61 | ||
62 | #define BOOST_TEST_REF( f ) BOOST_TEST( &boost::ref( f ).get() == &f ) | |
63 | ||
64 | int main() | |
65 | { | |
66 | int v = 0; | |
67 | BOOST_TEST_REF( v ); | |
68 | ||
69 | BOOST_TEST_REF( f0 ); | |
70 | BOOST_TEST_REF( f1 ); | |
71 | BOOST_TEST_REF( f2 ); | |
72 | BOOST_TEST_REF( f3 ); | |
73 | BOOST_TEST_REF( f4 ); | |
74 | BOOST_TEST_REF( f5 ); | |
75 | BOOST_TEST_REF( f6 ); | |
76 | BOOST_TEST_REF( f7 ); | |
77 | BOOST_TEST_REF( f8 ); | |
78 | BOOST_TEST_REF( f9 ); | |
79 | ||
80 | return boost::report_errors(); | |
81 | } |