https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121940
Bug ID: 121940
Summary: function_ref CTAD is not SFINAE friendly
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
...which should be, right? Because its CTAD is constrained.
#include <functional>
void f();
template<class T>
concept CanCtad = requires (T& i)
{ std::function_ref(std::nontype<f>, i); };
static_assert(!CanCtad<int>);
https://godbolt.org/z/vjT5bWvh9