Skip to content

Commit 4452b9b

Browse files
authored
Merge pull request #423 from redboltz/fix_345
Fix 345
2 parents 46ff4c2 + 0a3f8cd commit 4452b9b

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ matrix:
9595
addons: *addonsconfig
9696

9797
script:
98-
- CXXFLAGS="${CXXFLAGS} -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING"
98+
- CXXFLAGS="${CXXFLAGS} -pedantic -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DBOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING"
9999
- mkdir build && cd build && cmake -DCMAKE_CXX_COMPILER="${CXX}" -DCMAKE_C_COMPILER="${CC}" -DCMAKE_LIBRARY_PATH="${BASE}/usr/lib" -DOPENSSL_ROOT_DIR="${OPENSSL_ROOT_DIR}" $FLAGS .. && make check_deps VERBOSE=1 && travis_wait 50 make $MAKEFLAGS VERBOSE=1 && ctest -VV
100100

101101
after_success:

include/mqtt/type_erased_socket.hpp

+4-19
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,17 @@
1717
#include <mqtt/namespace.hpp>
1818
#include <mqtt/shared_any.hpp>
1919

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"
3724
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_async_read), async_read, 3)
3825
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_async_write), async_write, 3)
3926
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_write), write, 2)
4027
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_post), post, 1)
4128
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_lowest_layer), lowest_layer, 0)
4229
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_close), close, 1)
4330

44-
#endif // BOOST_VERSION >= 106700
45-
4631
namespace MQTT_NS {
4732

4833
namespace as = boost::asio;

0 commit comments

Comments
 (0)