-
Notifications
You must be signed in to change notification settings - Fork 745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NFC][SYCL] Refactor OSUtils to use std::filesystem #16447
base: sycl
Are you sure you want to change the base?
Conversation
15d464b
to
70d86fc
Compare
if (isPathPresent(Dir)) | ||
return 0; | ||
|
||
// older GCC doesn't have full C++ 17 support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
"#if defined(__has_include) && __has_include()" really false for old gcc?
would it be better to use feature test macro? https://en.cppreference.com/w/cpp/feature_test#cpp_lib_filesystem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
"#if defined(__has_include) && __has_include()" really false for old gcc?
Yes: https://godbolt.org/z/Wf3oMGMeG
would it be better to use feature test macro? https://en.cppreference.com/w/cpp/feature_test#cpp_lib_filesystem
I think we can not use feature test macro here. Because, cpp doc says:
Unlike the language feature test macros, they are not predefined. Instead, they are provided by the header <version>
For each library feature test macro, it is also provided by the headers that provide the relevant standard library components.
<version>
header is available post C++ 20, so IIUC, it is not available with older compilers: https://en.cppreference.com/w/cpp/header/version
For older gcc versions (< 8), use
std::experimental::filesystem
.