public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/57943] New: [c++11] invalid decltype expression accepted in template default type
@ 2013-07-20 22:16 f.heckenbach@fh-soft.de
  2020-05-14 17:05 ` [Bug c++/57943] " ppalka at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: f.heckenbach@fh-soft.de @ 2013-07-20 22:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57943

            Bug ID: 57943
           Summary: [c++11] invalid decltype expression accepted in
                    template default type
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: f.heckenbach@fh-soft.de

The following program compiles and apparently defaults T as a, altough a (0) is
not a valid expression.

struct a { };

template <typename T = decltype (a (0))> void f () { }

int main ()
{
  // decltype (a (0)) x;  // correctly rejected
  f ();
}


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

end of thread, other threads:[~2020-07-24 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-20 22:16 [Bug c++/57943] New: [c++11] invalid decltype expression accepted in template default type f.heckenbach@fh-soft.de
2020-05-14 17:05 ` [Bug c++/57943] " ppalka at gcc dot gnu.org
2020-05-15 23:34 ` cvs-commit at gcc dot gnu.org
2020-05-15 23:36 ` ppalka at gcc dot gnu.org
2020-07-24 18:40 ` cvs-commit 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).