diff options
author | hjk <[email protected]> | 2025-05-23 15:32:58 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2025-05-23 14:56:57 +0000 |
commit | 77ef58eb6f164c350801f9a2dcb90dea074251aa (patch) | |
tree | 9141b17d3f9f6719e6fd8c88c67f1f7c672fa1cb | |
parent | 15e777d8f49404516321faa19ef939fe24682a0b (diff) |
A comment earlier claimed this was not needed for c++20, but it
apparently is.
Amends 41d7b001dce6c5490b208cb.
Change-Id: I310f4e6287d497686f8c23b706ed3a3dfaa59e35
Reviewed-by: Marcus Tillmanns <[email protected]>
-rw-r--r-- | src/libs/utils/overloaded.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libs/utils/overloaded.h b/src/libs/utils/overloaded.h index 4781b00c2ee..c683dcfd19e 100644 --- a/src/libs/utils/overloaded.h +++ b/src/libs/utils/overloaded.h @@ -3,12 +3,13 @@ #pragma once -namespace Utils -{ +namespace Utils { // https://www.cppstories.com/2018/09/visit-variants/ // https://en.cppreference.com/w/cpp/utility/variant/visit // https://en.cppreference.com/w/cpp/utility/variant/visit2 template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; }; -} +template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>; + +} // Utils |