Why does Visual Studio IntelliSense give error E0304 when the code compiles just fine?

22 hours ago 1
ARTICLE AD BOX
#include <concepts> #include <format> template<typename T> requires std::constructible_from<std::format_string<>, T> void foo(T&) {} int main() { foo(""); }

This code compiles fine. However, IntelliSense tells me that

no instance of function template "foo" matches the argument list.

enter image description here

Why? Can I fix this?

This is Visual Studio 2026 v18.4.2.

Read Entire Article