vbvictor wrote: And the check doesn't work if we use actual map instead of fake one: https://godbolt.org/z/xxWdzGs9d And If you instantiate the function, it works with the template. https://github.com/llvm/llvm-project/pull/175121