Skip to content

Commit

Permalink
Fixed #345.
Browse files Browse the repository at this point in the history
Removed new version ob BOOST_TYPE_ERASURE_MEMBER.

The new style requires compiler extension.
If -pedantic compile option is set, then get
"must specify at least one argument for '...' parameter of variadic macro"
  • Loading branch information
redboltz committed Sep 12, 2019
1 parent 46ff4c2 commit 4126165
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions include/mqtt/type_erased_socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,17 @@
#include <mqtt/namespace.hpp>
#include <mqtt/shared_any.hpp>

#if BOOST_VERSION >= 106700

namespace MQTT_NS {

// New style boost type_erasure member fucntion concept definition
BOOST_TYPE_ERASURE_MEMBER(has_async_read, async_read)
BOOST_TYPE_ERASURE_MEMBER(has_async_write, async_write)
BOOST_TYPE_ERASURE_MEMBER(has_write, write)
BOOST_TYPE_ERASURE_MEMBER(has_post, post)
BOOST_TYPE_ERASURE_MEMBER(has_lowest_layer, lowest_layer)
BOOST_TYPE_ERASURE_MEMBER(has_close, close)

} // namespace MQTT_NS

#else // BOOST_VERSION >= 106700

// Old style boost type_erasure member fucntion concept definition
// I intentionally use old style boost type_erasure member fucntion concept definition.
// The new style requires compiler extension.
// If -pedantic compile option is set, then get
// "must specify at least one argument for '...' parameter of variadic macro"
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_async_read), async_read, 3)
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_async_write), async_write, 3)
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_write), write, 2)
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_post), post, 1)
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_lowest_layer), lowest_layer, 0)
BOOST_TYPE_ERASURE_MEMBER((mqtt)(has_close), close, 1)

#endif // BOOST_VERSION >= 106700

namespace MQTT_NS {

namespace as = boost::asio;
Expand Down

0 comments on commit 4126165

Please sign in to comment.