Why this Injected-class-name 'leaked' when using MSVC
19:51 06 Nov 2025

Here's the code:

#include 

namespace stdfs = std::filesystem;

int main()
{
    auto time= stdfs::file_time_type::time_point::duration {int64_t{}};
    stdfs::file_time_type::time_point{time};
    return 0;
}

When using gcc and clang, it will fail with a clear error ouput, but when comes to MSVC, it compiled, like a Injected-class-name 'leaked'

You can see the ouput in https://www.godbolt.org/z/vj3KdP4Ws

So is this just a Microsoft extension?

c++ compiler-errors msvcrt