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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> ---
omp_declare_variant_finalize_one works by building a forwarding call to the
variant, i.e. rvalue_int_variant(std::forward<T&&>(p)).  Normal template
argument deduction from T&& vs int&& then deduces int for T, as substituting
int for T produces int&&, which is the desired type.  Note that the decltype
checks pass.

It's not clear to me that this behavior is wrong; the OpenMP standard says
nothing about templates.

Reply via email to