File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88#define MQTT_IS_INVOCABLE_HPP
99
1010#include < type_traits>
11- #include < boost/callable_traits.hpp>
12-
1311#include < mqtt/namespace.hpp>
1412
15- namespace MQTT_NS {
1613
17- #if __cplusplus >= 201703L || defined(_MSC_VER)
14+ #if __cplusplus >= 201703L
15+
16+ namespace MQTT_NS {
1817
1918template <typename Func, typename ... Params>
2019using is_invocable = typename std::is_invocable<Func, Params...>;
2120
21+ } // namespace MQTT_NS
22+
2223#else // __cplusplus >= 201703L
2324
24- template <typename Func, typename ... Params>
25- using is_invocable = typename boost::callable_traits::is_invocable<Func, Params...>;
25+ #include < functional>
2626
27- #endif // __cplusplus >= 201703L
27+ namespace MQTT_NS {
28+
29+ template <typename Func, typename ... Params>
30+ struct is_invocable : std::is_constructible<
31+ std::function<void (Params...)>,
32+ std::reference_wrapper<typename std::remove_reference<Func>::type>
33+ >
34+ {};
2835
2936} // namespace MQTT_NS
3037
38+ #endif // __cplusplus >= 201703L
39+
3140#endif // MQTT_IS_INVOCABLE_HPP
You can’t perform that action at this time.
0 commit comments