[Bug c++/92255] New: No "did you mean" hint for specialization of unrecognised variable template
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Oct 28 15:01:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92255
Bug ID: 92255
Summary: No "did you mean" hint for specialization of
unrecognised variable template
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
namespace X::Y {
template<typename T> inline constexpr bool foo = false;
}
struct A { };
template<>
constexpr bool X::foo<A> = true;
Compiled with -std=gnu++17 this says:
v.cc:8:22: error: expected initializer before '<' token
8 | constexpr bool X::foo<A> = true;
| ^
It would be useful to suggest X::Y::foo.
I spent an embarrassingly long time trying to figure out why my specialization
wasn't compiling.
More information about the Gcc-bugs
mailing list