Skip to content

Commit

Permalink
remove overloaded to avoid c++17 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Nov 26, 2023
1 parent fd5a8a7 commit 672caab
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions include/ginkgo/core/base/utils_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,29 +514,6 @@ class null_deleter<T[]> {
};


/**
* Overloaded idiom for use with std::visit.
*
* Typical use case:
* ```c++
* std::variant<int, float> v;
* std::visit(overloaded{
* [](int) { cout << "int";},
* [](float) { cout << "float";};
* }, v);
* ```
* Return values are also supported. Note that it is critical to use curly-brace
* initializer for overloaded.
*/
template <class... Ts>
struct overloaded : Ts... {
using Ts::operator()...;
};
// explicit deduction guide (not needed as of C++20)
template <class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;


} // namespace gko


Expand Down

0 comments on commit 672caab

Please sign in to comment.