public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96218] New: DR 2032: Default template-arguments of variable templates
@ 2020-07-16 12:28 mpolacek at gcc dot gnu.org
  2020-07-16 12:54 ` [Bug c++/96218] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-16 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96218
           Summary: DR 2032: Default template-arguments of variable
                    templates
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

// DR 2032 - Default template-arguments of variable templates

// [temp.param]/14: If a template-parameter of a class template, variable
// template, or alias template has a default template-argument, each subsequent
// template-parameter shall either have a default template-argument supplied or
// be a template parameter pack.
template<typename T = int, typename U> // error
T vt;

// [temp.param]/14: If a template-parameter of a primary class template,
// primary variable template, or alias template is a template parameter pack,
// it shall be the last template-parameter.
template<typename... Ts, typename U> // error
int vt2;

Here we should give two errors under DR 2032, but we only give the first one.

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

* [Bug c++/96218] DR 2032: Default template-arguments of variable templates
  2020-07-16 12:28 [Bug c++/96218] New: DR 2032: Default template-arguments of variable templates mpolacek at gcc dot gnu.org
@ 2020-07-16 12:54 ` mpolacek at gcc dot gnu.org
  2020-08-03 21:43 ` cvs-commit at gcc dot gnu.org
  2020-08-03 21:45 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-16 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-07-16

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

* [Bug c++/96218] DR 2032: Default template-arguments of variable templates
  2020-07-16 12:28 [Bug c++/96218] New: DR 2032: Default template-arguments of variable templates mpolacek at gcc dot gnu.org
  2020-07-16 12:54 ` [Bug c++/96218] " mpolacek at gcc dot gnu.org
@ 2020-08-03 21:43 ` cvs-commit at gcc dot gnu.org
  2020-08-03 21:45 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-03 21:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:50bee766bc9f4020cf1f814178155d16e80dccaa

commit r11-2521-g50bee766bc9f4020cf1f814178155d16e80dccaa
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Jul 16 09:15:37 2020 -0400

    c++: Variable template and template parameter pack [PR96218]

    This is DR 2032 which says that the restrictions regarding template
    parameter packs and default arguments apply to variable templates as
    well, but we weren't detecting that.

    gcc/cp/ChangeLog:

            DR 2032
            PR c++/96218
            * pt.c (check_default_tmpl_args): Also consider variable
            templates.

    gcc/testsuite/ChangeLog:

            DR 2032
            PR c++/96218
            * g++.dg/cpp1y/var-templ67.C: New test.

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

* [Bug c++/96218] DR 2032: Default template-arguments of variable templates
  2020-07-16 12:28 [Bug c++/96218] New: DR 2032: Default template-arguments of variable templates mpolacek at gcc dot gnu.org
  2020-07-16 12:54 ` [Bug c++/96218] " mpolacek at gcc dot gnu.org
  2020-08-03 21:43 ` cvs-commit at gcc dot gnu.org
@ 2020-08-03 21:45 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-08-03 21:45 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-08-03 21:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16 12:28 [Bug c++/96218] New: DR 2032: Default template-arguments of variable templates mpolacek at gcc dot gnu.org
2020-07-16 12:54 ` [Bug c++/96218] " mpolacek at gcc dot gnu.org
2020-08-03 21:43 ` cvs-commit at gcc dot gnu.org
2020-08-03 21:45 ` mpolacek 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).