public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101463] New: Using a constexpr variable template specialization as default argument for non-type template parameter of reference type leads gcc to reject function call
@ 2021-07-15 15:38 michael.kenzel at gmail dot com
2023-12-17 16:24 ` [Bug c++/101463] [11/12/13/14 Regression]Using " ppalka at gcc dot gnu.org
2024-03-22 14:09 ` [Bug c++/101463] [11/12/13/14 Regression] Using " law at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: michael.kenzel at gmail dot com @ 2021-07-15 15:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101463
Bug ID: 101463
Summary: Using a constexpr variable template specialization as
default argument for non-type template parameter of
reference type leads gcc to reject function call
Product: gcc
Version: 11.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: michael.kenzel at gmail dot com
Target Milestone: ---
The following code will reproduce the issue:
extern const int a;
template <typename T>
constexpr const int& blub = a;
template <typename T, const int& b = blub<T>>
void f() {}
int main()
{
f<void>(); // error: no matching function for call to
'f<void>()'
f<void, blub<void>>(); // ok
}
Note: gcc will accept the function call when the exact same template argument
is explicitly specified instead.
godbolt link: https://godbolt.org/z/jd3EGWEfo
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/101463] [11/12/13/14 Regression]Using a constexpr variable template specialization as default argument for non-type template parameter of reference type leads gcc to reject function call
2021-07-15 15:38 [Bug c++/101463] New: Using a constexpr variable template specialization as default argument for non-type template parameter of reference type leads gcc to reject function call michael.kenzel at gmail dot com
@ 2023-12-17 16:24 ` ppalka at gcc dot gnu.org
2024-03-22 14:09 ` [Bug c++/101463] [11/12/13/14 Regression] Using " law at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-12-17 16:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101463
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Known to work| |6.2.0
Summary|Using a constexpr variable |[11/12/13/14
|template specialization as |Regression]Using a
|default argument for |constexpr variable template
|non-type template parameter |specialization as default
|of reference type leads gcc |argument for non-type
|to reject function call |template parameter of
| |reference type leads gcc to
| |reject function call
Last reconfirmed| |2023-12-17
Target Milestone|--- |11.5
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
GCC 6.1/6.2 accepts (with -std=c++17), we started ICEing on this testcase after
r7-5370-gb4ba0852099ad2, and then rejecting it after r8-7014-ge8ef9fdfb9fd4b.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/101463] [11/12/13/14 Regression] Using a constexpr variable template specialization as default argument for non-type template parameter of reference type leads gcc to reject function call
2021-07-15 15:38 [Bug c++/101463] New: Using a constexpr variable template specialization as default argument for non-type template parameter of reference type leads gcc to reject function call michael.kenzel at gmail dot com
2023-12-17 16:24 ` [Bug c++/101463] [11/12/13/14 Regression]Using " ppalka at gcc dot gnu.org
@ 2024-03-22 14:09 ` law at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-22 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101463
Jeffrey A. Law <law at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
Priority|P3 |P2
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-22 14:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-15 15:38 [Bug c++/101463] New: Using a constexpr variable template specialization as default argument for non-type template parameter of reference type leads gcc to reject function call michael.kenzel at gmail dot com
2023-12-17 16:24 ` [Bug c++/101463] [11/12/13/14 Regression]Using " ppalka at gcc dot gnu.org
2024-03-22 14:09 ` [Bug c++/101463] [11/12/13/14 Regression] Using " law at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).