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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to John McFarlane from comment #0)
> The following code compiles:
> 
> template<typename T> struct S {};
> template<typename T> constexpr T v;
> constexpr auto c = v<S<void>>;
> 
> The result is a variable of type `struct S<void>` which appears to be
> value-initialized.
> 
> Expected: 
> Compiler emits an error for `c` because there is no such variable as `v` of
> `S` of `void` (or `v` of anything else for that matter).

Clang and EDG agree that the original testcase is valid, probably because they
now implement CWG 253, i.e. what I said in comment 2 and demonstrated in
comment 4.

Not a bug.

Reply via email to