|
17 | 17 | #include <mqtt/namespace.hpp>
|
18 | 18 | #include <mqtt/shared_any.hpp>
|
19 | 19 |
|
20 |
| -#if BOOST_VERSION >= 106700 |
21 |
| - |
22 |
| -namespace MQTT_NS { |
23 |
| - |
24 |
| -// New style boost type_erasure member fucntion concept definition |
25 |
| -BOOST_TYPE_ERASURE_MEMBER(has_async_read, async_read) |
26 |
| -BOOST_TYPE_ERASURE_MEMBER(has_async_write, async_write) |
27 |
| -BOOST_TYPE_ERASURE_MEMBER(has_write, write) |
28 |
| -BOOST_TYPE_ERASURE_MEMBER(has_post, post) |
29 |
| -BOOST_TYPE_ERASURE_MEMBER(has_lowest_layer, lowest_layer) |
30 |
| -BOOST_TYPE_ERASURE_MEMBER(has_close, close) |
31 |
| - |
32 |
| -} // namespace MQTT_NS |
33 |
| - |
34 |
| -#else // BOOST_VERSION >= 106700 |
35 |
| - |
36 |
| -// Old style boost type_erasure member fucntion concept definition |
| 20 | +// I intentionally use old style boost type_erasure member fucntion concept definition. |
| 21 | +// The new style requires compiler extension. |
| 22 | +// If -pedantic compile option is set, then get |
| 23 | +// "must specify at least one argument for '...' parameter of variadic macro" |
37 | 24 | BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_async_read), async_read, 3)
|
38 | 25 | BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_async_write), async_write, 3)
|
39 | 26 | BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_write), write, 2)
|
40 | 27 | BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_post), post, 1)
|
41 | 28 | BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_lowest_layer), lowest_layer, 0)
|
42 | 29 | BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_close), close, 1)
|
43 | 30 |
|
44 |
| -#endif // BOOST_VERSION >= 106700 |
45 |
| - |
46 | 31 | namespace MQTT_NS {
|
47 | 32 |
|
48 | 33 | namespace as = boost::asio;
|
|
0 commit comments