https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102780

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Patrick suggested defining the destructor constraint like this instead:


  // Conditionally non-trivial dtor, if required.
  constexpr ~variadic_union()
    requires (!trivially_destructible<T>)
          || (!trivially_destructible<variadic_union<U...>>)
  { }


This makes a huge difference in the examples above, making them compile much
faster.

Reply via email to