async_mqtt 5.0.0
Loading...
Searching...
No Matches
variant.hpp
1// Copyright Takatoshi Kondo 2022
2//
3// Distributed under the Boost Software License, Version 1.0.
4// (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7#if !defined(ASYNC_MQTT_UTIL_VARIANT_HPP)
8#define ASYNC_MQTT_UTIL_VARIANT_HPP
9
10#include <variant>
11
12namespace async_mqtt {
13
14using std::variant;
15using std::monostate;
16using std::visit;
17
18// overload for std::visit lambda expressions
19template<class... Ts> struct overload : Ts... { using Ts::operator()...; };
20template<class... Ts> overload(Ts...) -> overload<Ts...>;
21
22} // namespace async_mqtt
23
24#endif // ASYNC_MQTT_UTIL_VARIANT_HPP