Skip to content

Conversation

@miyanyan
Copy link
Contributor

@miyanyan miyanyan commented Nov 6, 2025

I got this error when I use clang + windows:

[build] FAILED: CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.obj
[build] C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\Llvm\x64\bin\CLANG_~1.EXE -DVCPKG_BASE_VERSION=2999-12-31 -DVCPKG_VERSION=unknownhash -D_FILE_OFFSET_BITS=64 -ID:/github/miyanyan/vcpkg-tool/include -ID:/github/miyanyan/vcpkg-tool/out/build/Win-x64-Debug/_deps/fmt-src/include -ID:/github/miyanyan/vcpkg-tool/out/build/Win-x64-Debug/_cmrc/include -Wall -Wextra -Wpedantic -Wno-unknown-pragmas -Wno-missing-field-initializers -Wno-redundant-move -Wmissing-prototypes -Wno-range-loop-analysis -O0 -g -Xclang -gcodeview -std=c++17 -D_DEBUG -Xclang -flto-visibility-public-std -D_MT -Xclang --dependent-lib=libcmtd -Xclang -include-pch -Xclang D:/github/miyanyan/vcpkg-tool/out/build/Win-x64-Debug/CMakeFiles/vcpkglib.dir/cmake_pch.hxx.pch -Xclang -include -Xclang D:/github/miyanyan/vcpkg-tool/out/build/Win-x64-Debug/CMakeFiles/vcpkglib.dir/cmake_pch.hxx -MD -MT CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.obj -MF CMakeFiles\vcpkglib.dir\src\vcpkg\base\files.cpp.obj.d -o CMakeFiles/vcpkglib.dir/src/vcpkg/base/files.cpp.obj -c D:/github/miyanyan/vcpkg-tool/src/vcpkg/base/files.cpp
[build] D:/github/miyanyan/vcpkg-tool/src/vcpkg/base/files.cpp:3933:59: error: qualified reference to 'time_point' is a constructor name rather than a type in this context
[build]  3933 |                                    stdfs::file_time_type::time_point{stdfs::file_time_type::time_point::duration {
[build]       |                                                           ^
[build] 1 error generated.

file_time_type is time_point, and doesn't have time_point type, I'm wondering why MSVC support this...

https://en.cppreference.com/w/cpp/filesystem/file_time_type.html
https://en.cppreference.com/w/cpp/chrono/time_point.html

@miyanyan
Copy link
Contributor Author

miyanyan commented Nov 6, 2025

Oh, I found Injected-class-name, https://en.cppreference.com/w/cpp/language/injected-class-name.html

But gcc and clang not support this, I'm confused
https://www.godbolt.org/z/vj3KdP4Ws

Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building on Windows with non-MSVC is an explicit non-goal for us but there's no reason for use of the injected class name here. I think I (or whomever wrote tis first) thought it was a duration or clock instead.

@BillyONeal BillyONeal merged commit 5e1e346 into microsoft:main Nov 6, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants