https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #12 from Jonathan Wakely ---
Yes but for the function template case if I want to use it in constexpr I add
'constexpr' and it's implicitly inline. For the variable template
specialisation it's already constexpr, and I can't define it
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #11 from Jakub Jelinek ---
And
template int foo (void) { return N; }
template <> int foo <42> (void) { return -42; }
int a = foo<15> ();
int b = foo<42> ();
works the same, _Z3fooILi15EEiv is comdat exported weak, _Z3fooILi42EEiv is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #10 from Jonathan Wakely ---
(In reply to Jakub Jelinek from comment #8)
> So the DR just turns the same for const/constexpr variable templates and
> their specializations too.
Yeah, I guess it's consistent.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
Jakub Jelinek changed:
What|Removed |Added
CC||jason at gcc dot gnu.org
--- Comment #9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #8 from Jakub Jelinek ---
Is there a reason why this should be treated any differently from non-const
variable templates and their explicit specializations?
If I try
template bool var = true;
template<> bool var = false;
bool *p = &v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #7 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #6)
> It looks like explicit specializations are not given vague linkage. Is that
> the correct behaviour?
I wonder if that is related to PR 116746 .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #6 from Jonathan Wakely ---
It looks like explicit specializations are not given vague linkage. Is that the
correct behaviour?
/usr/bin/ld: /tmp/ccjbP7xI.o:/tmp/t.h:2: multiple definition of `var';
/tmp/ccMCRAVO.o:/tmp/t.h:2: first
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
Jakub Jelinek changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
--- Comment #4 from GCC Commits ---
The master branch has been updated by Jakub Jelinek :
https://gcc.gnu.org/g:82cd63a63eaa61a4ed5c4029a1869be7446ecb3c
commit r15-2798-g82cd63a63eaa61a4ed5c4029a1869be7446ecb3c
Author: Jakub Jelinek
Date: W
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
Jakub Jelinek changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
Andrew Pinski changed:
What|Removed |Added
Ever confirmed|0 |1
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109126
Andrew Pinski changed:
What|Removed |Added
CC||de34 at live dot cn
--- Comment #1 from
12 matches
Mail list logo