public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "roman.kurc at wp dot pl" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/64519] New: variadic template as the first argument Date: Wed, 07 Jan 2015 09:12:00 -0000 [thread overview] Message-ID: <bug-64519-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64519 Bug ID: 64519 Summary: variadic template as the first argument Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: roman.kurc at wp dot pl Created attachment 34392 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34392&action=edit sample code It seems that passing an empty argument to a variadic template results in assigning void type to the argument. Such a behavior can be seen in the following cases: static_assert( std::is_same< decltype(B::test()), B::CharA<3> >::value == false, "test( ) should evaluate to fun( )" ); test( TA... args ) is called with no parameters then I<TA...>::template sfinae_2<B>(args...,0) and args... gets void type. The same happens in calls presented below and it does not matter if template is instantinated or only its type is deduced. static_assert( (sizeof(B::test()) == sizeof(B::CharA<1>)), "test( ) should evaluate to fun ()" ); static_assert( std::is_same< decltype(B::test()), B::CharA<1> >::value, "test() should evaluate to fun()" );
next reply other threads:[~2015-01-07 9:12 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-07 9:12 roman.kurc at wp dot pl [this message] 2021-07-31 21:59 ` [Bug c++/64519] " pinskia at gcc dot gnu.org 2021-07-31 21:59 ` pinskia at gcc dot gnu.org 2021-08-27 0:20 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-64519-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).