https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82247
Casey Carter <Casey at Carter dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Casey at Carter dot net --- Comment #4 from Casey Carter <Casey at Carter dot net> --- This is not a bug: it's two-phase name lookup. At the point of definition for Fooable: #include <string> #include <vector> template <typename T> bool concept Fooable = requires(const T& t) { { foo(t) }; // foo is unknown here }; the compiler records the set of declarations it has seen for "foo" (the empty set). When you later "instantiate" the concept foo can only resolve to (a) a member of the (again, empty) set recorded at definition, or (b) a declaration found by argument-dependent lookup. Since there are no associated namespaces for fundamental types, only your user-defined type which has a "foo" defined in its associated namespace successfully concept checks.