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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=105797
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot 
gnu.org
   Last reconfirmed|                            |2023-05-01
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Keywords|                            |rejects-valid
   Target Milestone|---                         |13.2
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Thanks for the bug report.  Started with r13-980-gdf4f95dbd4764f which made
function parameters used in a constraint no longer induce a dependency on all
contextual template parameters.

So another workaround would be to make the constructor's constraints explicitly
depend on the second template parameter of the class:

template <typename T, typename U>
struct VariantConstructors {
  VariantConstructors(T&& t)
    requires(requires { T(t); typename U; });
};

...

Reply via email to