userver: userver/utils/overloaded.hpp Source File
Loading...
Searching...
No Matches
overloaded.hpp
Go to the documentation of this file.
1#pragma once
2
3/// @file userver/utils/overloaded.hpp
4/// @brief @copybrief utils::Overloaded
5
6USERVER_NAMESPACE_BEGIN
7
8namespace utils {
9
10/// @ingroup userver_universal
11///
12/// @brief Utility to define std::variant visitors in a simple way
13template <class... Ts>
14struct Overloaded : Ts... { // NOLINT(fuchsia-multiple-inheritance)
15 using Ts::operator()...;
16};
17
18template <class... Ts>
19Overloaded(Ts...) -> Overloaded<Ts...>;
20
21} // namespace utils
22
23USERVER_NAMESPACE_END