public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102041] New: Pretty printing of variable templates could be improved
@ 2021-08-24 13:37 redi at gcc dot gnu.org
  2022-01-18 13:11 ` [Bug c++/102041] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-24 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102041
           Summary: Pretty printing of variable templates could be
                    improved
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

This incorrect code:

template<typename T>
concept foo = true;

template<typename T> requires foo<T>
constexpr bool variable = true;

static_assert( variable<int>::value );


Gives this error:

c.C:7:16: error: variable template-id 'variable<int>' in nested-name-specifier
    7 | static_assert( variable<int>::value );
      |                ^~~~~~~~~~~~~
c.C:5:16: note: 'template<class T>  requires  foo<T> constexpr const bool
variable<T>' declared here
    5 | constexpr bool variable = true;
      |                ^~~~~~~~

Showing the "requires  foo<t>" part in the note probably isn't very useful (and
why is there a double space?)

And printing "variable<T>" just seems wrong, it's not a specialization.

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

* [Bug c++/102041] Pretty printing of variable templates could be improved
  2021-08-24 13:37 [Bug c++/102041] New: Pretty printing of variable templates could be improved redi at gcc dot gnu.org
@ 2022-01-18 13:11 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-18 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-01-18

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

end of thread, other threads:[~2022-01-18 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24 13:37 [Bug c++/102041] New: Pretty printing of variable templates could be improved redi at gcc dot gnu.org
2022-01-18 13:11 ` [Bug c++/102041] " redi 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).