================ @@ -2596,6 +2596,15 @@ template <typename T> using has_sizeof = decltype(sizeof(T)); template <typename T> constexpr bool is_incomplete_v = !is_detected<detail::has_sizeof, T>::value; +//===----------------------------------------------------------------------===// +// Extra additions to <variant> +//===----------------------------------------------------------------------===// + +template <class... Ts> struct overloaded : Ts... { + using Ts::operator()...; +}; +template <class... Ts> overloaded(Ts...) -> overloaded<Ts...>; + ---------------- Bigcheese wrote:
Yeah, I can split this out. I don't see `make_visitor` in the codebase (git grep). I looked at all uses of `std::visit` to see if we already had something similar and didn't see anything. https://github.com/llvm/llvm-project/pull/119740 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits