public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65396] New: Function template default template arguments not merged
@ 2015-03-12  2:49 david at stellarscience dot com
  2015-03-12 11:11 ` [Bug c++/65396] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: david at stellarscience dot com @ 2015-03-12  2:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65396
           Summary: Function template default template arguments not
                    merged
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david at stellarscience dot com

template <typename T, T *> void f();

template <typename T, T * = nullptr> void f() {}

int main() { f<int>(); }

------------------------

gcc inaccurately rejects this program, which is violating the following
sentence from [C++11 14.1 p10]

The set of default template-arguments available for use with a template
declaration or definition is obtained by merging the default arguments from the
definition (if in scope) and all declarations in scope in the same way default
function arguments are (8.3.6).


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-09 13:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-12  2:49 [Bug c++/65396] New: Function template default template arguments not merged david at stellarscience dot com
2015-03-12 11:11 ` [Bug c++/65396] " redi at gcc dot gnu.org
2021-08-05  8:58 ` pinskia at gcc dot gnu.org
2021-08-05  9:01 ` pinskia at gcc dot gnu.org
2021-08-05  9:03 ` pinskia at gcc dot gnu.org
2021-09-12 20:07 ` pinskia at gcc dot gnu.org
2021-09-12 20:08 ` pinskia at gcc dot gnu.org
2022-03-03 20:07 ` ppalka at gcc dot gnu.org
2022-03-09 13:44 ` cvs-commit at gcc dot gnu.org
2022-03-09 13:46 ` ppalka 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).