public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97420] New: error: no matching function for call to 'find_if'
@ 2020-10-14 13:51 tangyixuan at mail dot dlut.edu.cn
  2020-10-14 13:54 ` [Bug c++/97420] " redi at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: tangyixuan at mail dot dlut.edu.cn @ 2020-10-14 13:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97420
           Summary: error: no matching function for call to 'find_if'
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tangyixuan at mail dot dlut.edu.cn
  Target Milestone: ---

Hi, the following code maybe valid, since 'std::find_if' is allowed since
c++17.
https://en.cppreference.com/w/cpp/algorithm/find

$ cat s.cpp

# include <cctype>
# include <algorithm>

template<int (& F)(int)>
constexpr int A(unsigned char a) noexcept(noexcept(F(a)))
{ return F(a); }

int main()
{
    const char t[] = "a";

    std::find_if(t, t + 1, A<std::isspace>);
}

$ g++ -c -std=c++2a s.cpp
s.cpp: In function ‘int main()’:
s.cpp:12:43: error: no matching function for call to ‘find_if(const char [2],
const char*, <unresolved overloaded function type>)’
   12 |     std::find_if(t, t + 1, A<std::isspace>);
      |

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

end of thread, other threads:[~2023-07-07  9:09 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 13:51 [Bug c++/97420] New: error: no matching function for call to 'find_if' tangyixuan at mail dot dlut.edu.cn
2020-10-14 13:54 ` [Bug c++/97420] " redi at gcc dot gnu.org
2020-10-14 14:08 ` redi at gcc dot gnu.org
2021-04-27  1:51 ` [Bug c++/97420] [8/9/10/11/12 Regression] NTTP function reference cannot bind to noexcept function ppalka at gcc dot gnu.org
2021-04-30  8:08 ` rguenth at gcc dot gnu.org
2021-05-07 12:58 ` ppalka at gcc dot gnu.org
2021-05-07 12:58 ` ppalka at gcc dot gnu.org
2021-05-14  9:54 ` [Bug c++/97420] [9/10/11/12 " jakub at gcc dot gnu.org
2021-05-26 13:08 ` cvs-commit at gcc dot gnu.org
2021-06-01  8:18 ` rguenth at gcc dot gnu.org
2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org
2021-07-13 14:03 ` [Bug c++/97420] [9/10 " ppalka at gcc dot gnu.org
2022-05-27  9:43 ` [Bug c++/97420] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-06-30  4:04 ` cvs-commit at gcc dot gnu.org
2023-07-07  9:09 ` rguenth 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).