/* * This source code is released into the public domain. */ module; #include export module nihil.match; namespace nihil { export template struct match : Ts... { using Ts::operator()...; }; export template [[nodiscard]] constexpr decltype(auto) operator| (std::variant const &v, match const &match) { return std::visit(match, v); } } // namespace nihil