QXmpp: QXmppVisitHelper_p.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
QXmppVisitHelper_p.h
1// SPDX-FileCopyrightText: 2021 Linus Jahn <lnj@kaidan.im>
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4
5#ifndef QXMPPVISITHELPER_P_H
6#define QXMPPVISITHELPER_P_H
7
8namespace QXmpp::Private {
9
10// helper for std::visit
11template<class... Ts>
12struct overloaded : Ts... {
13 using Ts::operator()...;
14};
15
16// explicit deduction guide (not needed as of C++20)
17template<class... Ts>
18overloaded(Ts...) -> overloaded<Ts...>;
19
20} // namespace QXmpp::Private
21
22#endif // QXMPPVISITHELPER_P_H