You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
323 B

  1. #pragma once
  2. namespace wizardry {
  3. // taken from cppreference: https://en.cppreference.com/w/cpp/utility/variant/visit
  4. template<class... Ts>
  5. struct overloaded : Ts ... {
  6. using Ts::operator()...;
  7. };
  8. // explicit deduction guide (not needed as of C++20)
  9. template<class... Ts>
  10. overloaded(Ts...) -> overloaded<Ts...>;
  11. }