public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98767] New: Function signature lost in concept diagnostic message
@ 2021-01-20 13:31 antoshkka at gmail dot com
  2021-01-20 14:37 ` [Bug c++/98767] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: antoshkka at gmail dot com @ 2021-01-20 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98767
           Summary: Function signature lost in concept diagnostic message
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antoshkka at gmail dot com
  Target Milestone: ---

Consider the example:


template <typename Function, typename T>
concept Callable1Arg = requires(Function func, T value) {
    func(value);
};

// Should fail and fails:
static_assert(Callable1Arg<int(*)(int*), bool>);


The diagnotics has the following line:
"in requirements with 'Function func', 'T value' [with T = bool; Function = int
(*)()]"

However the type of the Function is "int (*)(int*)" not "int (*)()"


Godbolt playground: https://godbolt.org/z/afKqq5

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

end of thread, other threads:[~2022-03-13  0:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 13:31 [Bug c++/98767] New: Function signature lost in concept diagnostic message antoshkka at gmail dot com
2021-01-20 14:37 ` [Bug c++/98767] " redi at gcc dot gnu.org
2021-01-25 13:30 ` ensadc at mailnesia dot com
2021-04-16 22:58 ` ppalka at gcc dot gnu.org
2021-04-23 12:47 ` cvs-commit at gcc dot gnu.org
2022-03-13  0:52 ` ppalka 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).