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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|101603                      |
            Summary|GCC rejects valid program   |constraint on a member
                   |involving requires-clause   |function does causes
                   |                            |ambigious and not allowing
                   |                            |forming a pointer to the
                   |                            |function

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
At first I thought it was a pointer to member function issue but nope it is not
as the following happens too but we need to have have the class as a template
rather than the function:
extern "C" int puts(const char*);

template <typename T>
class myclass {
public:

  static void func(const T&) requires true
  {
     puts("true");
  }

  static void func(const T&) requires false
  {
     puts("false");
  }
};                                                                              

auto mylambda = &myclass<int>::func;


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101603
[Bug 101603] [meta-bug] pointer to member functions issues

Reply via email to