]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/local_function/test/all_decl.cpp
2 // Copyright (C) 2009-2012 Lorenzo Caminiti
3 // Distributed under the Boost Software License, Version 1.0
4 // (see accompanying file LICENSE_1_0.txt or a copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 // Home at http://www.boost.org/libs/local_function
8 #include <boost/config.hpp>
9 #ifdef BOOST_NO_CXX11_VARIADIC_MACROS
10 # error "variadic macros required"
13 #include <boost/local_function.hpp>
14 #include <boost/typeof/typeof.hpp>
15 #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
18 BOOST_TYPEOF_REGISTER_TYPE(s
) // Register before binding `this_` below.
20 // Compile all local function declaration combinations.
22 void f(double p
= 1.23, double q
= -1.23) {
24 void BOOST_LOCAL_FUNCTION(int x
, int y
, default 0) {
25 } BOOST_LOCAL_FUNCTION_NAME(l
)
28 { // Only const binds.
31 const int& BOOST_LOCAL_FUNCTION(const bind a
,
32 const bind
& b
, const bind
& p
, const bind q
) {
34 } BOOST_LOCAL_FUNCTION_NAME(l
)
37 const s
& BOOST_LOCAL_FUNCTION(const bind this_
) {
39 } BOOST_LOCAL_FUNCTION_NAME(t
)
42 const int BOOST_LOCAL_FUNCTION(const bind a
,
43 const bind
& b
, const bind
& p
, const bind q
,
46 } BOOST_LOCAL_FUNCTION_NAME(lt
)
49 { // Only plain binds.
52 int& BOOST_LOCAL_FUNCTION(bind c
, bind
& d
,
55 } BOOST_LOCAL_FUNCTION_NAME(l
)
58 s
& BOOST_LOCAL_FUNCTION(bind this_
) {
60 } BOOST_LOCAL_FUNCTION_NAME(t
)
63 int BOOST_LOCAL_FUNCTION(bind c
, bind
& d
,
64 bind
& p
, bind
& q
, bind this_
) {
66 } BOOST_LOCAL_FUNCTION_NAME(lt
)
70 { // Both params and const binds.
73 void BOOST_LOCAL_FUNCTION(const bind a
, const bind
& b
,
74 const bind
& p
, const bind q
,
75 int x
, int y
, default 0) {
76 } BOOST_LOCAL_FUNCTION_NAME(l
)
79 void BOOST_LOCAL_FUNCTION(const bind this_
,
80 int x
, int y
, default 0) {
81 } BOOST_LOCAL_FUNCTION_NAME(t
)
84 void BOOST_LOCAL_FUNCTION(const bind a
, const bind this_
,
85 const bind
& b
, const bind
& p
, const bind q
,
86 int x
, int y
, default 0) {
87 } BOOST_LOCAL_FUNCTION_NAME(lt
)
90 { // Both params and plain binds.
93 void BOOST_LOCAL_FUNCTION(bind c
, bind
& d
, bind
& p
, bind q
,
94 int x
, int y
, default 0) {
95 } BOOST_LOCAL_FUNCTION_NAME(l
)
98 void BOOST_LOCAL_FUNCTION(bind this_
,
99 int x
, int y
, default 0) {
100 } BOOST_LOCAL_FUNCTION_NAME(t
)
103 void BOOST_LOCAL_FUNCTION(bind c
, bind
& d
,
104 bind
& p
, bind this_
, bind q
,
105 int x
, int y
, default 0) {
106 } BOOST_LOCAL_FUNCTION_NAME(lt
)
109 { // Both const and plain binds.
112 void BOOST_LOCAL_FUNCTION(const bind a
, const bind
& b
,
113 const bind p
, bind c
, bind
& d
, bind q
) {
114 } BOOST_LOCAL_FUNCTION_NAME(l
)
117 void BOOST_LOCAL_FUNCTION(const bind this_
,
118 bind c
, bind
& d
, bind q
) {
119 } BOOST_LOCAL_FUNCTION_NAME(ct
)
121 void BOOST_LOCAL_FUNCTION(const bind this_
,
122 const bind a
, const bind
& b
, const bind p
,
123 bind c
, bind
& d
, bind q
) {
124 } BOOST_LOCAL_FUNCTION_NAME(lct
)
127 void BOOST_LOCAL_FUNCTION(const bind a
, const bind
& b
,
128 const bind p
, bind this_
) {
129 } BOOST_LOCAL_FUNCTION_NAME(pt
)
131 void BOOST_LOCAL_FUNCTION(const bind a
, const bind
& b
,
132 const bind p
, bind c
, bind this_
, bind
& d
, bind q
) {
133 } BOOST_LOCAL_FUNCTION_NAME(lpt
)
137 { // All params, const binds, and plain binds.
140 void BOOST_LOCAL_FUNCTION(
141 const bind a
, const bind
& b
, const bind
& p
,
142 bind c
, bind
& d
, bind
& q
, int x
, int y
, default 0) {
143 } BOOST_LOCAL_FUNCTION_NAME(l
)
146 void BOOST_LOCAL_FUNCTION(const bind this_
,
147 bind c
, bind
& d
, bind
& q
,
148 int x
, int y
, default 0) {
149 } BOOST_LOCAL_FUNCTION_NAME(ct
)
151 void BOOST_LOCAL_FUNCTION(
152 const bind a
, const bind
& b
, const bind
& p
,
153 bind this_
, int x
, int y
, default 0) {
154 } BOOST_LOCAL_FUNCTION_NAME(pt
)
157 void BOOST_LOCAL_FUNCTION(const bind a
, const bind this_
,
158 const bind
& b
, const bind
& p
, bind c
, bind
& d
,
159 bind
& q
, int x
, int y
, default 0) {
160 } BOOST_LOCAL_FUNCTION_NAME(lct
)
162 void BOOST_LOCAL_FUNCTION(const bind a
, const bind
& b
,
163 const bind
& p
, bind c
, bind
& d
, bind this_
, bind
& q
,
164 int x
, int y
, default 0) {
165 } BOOST_LOCAL_FUNCTION_NAME(lpt
)
176 #endif // VARIADIC_MACROS