public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64519] New: variadic template as the first argument
@ 2015-01-07  9:12 roman.kurc at wp dot pl
  2021-07-31 21:59 ` [Bug c++/64519] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: roman.kurc at wp dot pl @ 2015-01-07  9:12 UTC (permalink / raw)
  To: gcc-bugs

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()" );


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

* [Bug c++/64519] variadic template as the first argument
  2015-01-07  9:12 [Bug c++/64519] New: variadic template as the first argument roman.kurc at wp dot pl
@ 2021-07-31 21:59 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-31 21:59 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |8.4

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 8.4, 9.3 and 10+.

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

* [Bug c++/64519] variadic template as the first argument
  2015-01-07  9:12 [Bug c++/64519] New: variadic template as the first argument roman.kurc at wp dot pl
  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
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-31 21:59 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
.

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

* [Bug c++/64519] variadic template as the first argument
  2015-01-07  9:12 [Bug c++/64519] New: variadic template as the first argument roman.kurc at wp dot pl
  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
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-27  0:20 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=93140

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
By the way this was most likely fixed by the patch which fixed PR 93140.

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

end of thread, other threads:[~2021-08-27  0:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-07  9:12 [Bug c++/64519] New: variadic template as the first argument roman.kurc at wp dot pl
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

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).