1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 02:11:15 +02:00

Move C++17 "pattern matching" boilerplat to utils.hh

This commit is contained in:
John Ericson 2020-07-12 22:15:14 +00:00
parent 886c91dfcc
commit ffc18583b1
4 changed files with 5 additions and 12 deletions

View file

@ -597,4 +597,9 @@ constexpr auto enumerate(T && iterable)
}
// C++17 std::visit boilerplate
template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
}