https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67185
Casey Carter <Casey at Carter dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Casey at Carter dot net Version|6.0 |5.3.0 Blocks|67491 | Summary|[concepts] Link error on |[C++14] Link error on |ODR-use of constexpr |ODR-use of variable |constrained variable |template partial |template partial |specialization |specialization | --- Comment #1 from Casey Carter <Casey at Carter dot net> --- This same bug is triggered by the purely C++14 program: template <class> bool x = false; template <class T> bool x<T*> = true; bool& f() { return x<int*>; } int main() {} which when compiled with either g++ 5.3 or 6 results in /tmp/ccHHu1ip.o: In function `f()': prog.cc:(.text+0x5): undefined reference to `x' collect2: error: ld returned 1 exit status The problem has nothing to do with concepts or constexpr, but seems to be a general issue when ODR-using an instance of a template variable that was instantiated from a partial specialization. I'm recasting this as a C++14 bug against 5.3. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 [Bug 67491] [meta-bug] concepts issues