mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Move C++17 "pattern matching" boilerplat to utils.hh
This commit is contained in:
parent
886c91dfcc
commit
ffc18583b1
4 changed files with 5 additions and 12 deletions
|
@ -8,10 +8,6 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
// FIXME Put this somewhere?
|
||||
template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
|
||||
template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
|
||||
|
||||
StorePath DerivationOutput::path(const Store & store, std::string_view drvName) const
|
||||
{
|
||||
return std::visit(overloaded {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue