Skip to content

Conversation

@erikaldsund
Copy link
Contributor

Two fixes:

  • std::filesystem::path cannot be implicitly converted to std::string (2d04bd4)
  • Using std::filesystem in C++17 mode on gcc versions prior to gcc 8 is cumbersome (9c496bc). Proposition avoids using it for the reasons mentioned in the commit message.
A std::filesystem::path is not implicitly convertible to a std::string.
On gcc < 8, filesystem had to be included as <experimental/filesystem>, it
was also living in the std::experimental namespace, and also required the user
to link against -lstdc++fs.
@The-EDev The-EDev force-pushed the cpp17_filesystem_usage_fixes branch from 9c496bc to b127671 Compare August 5, 2022 21:59
Copy link
Member

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

A __has_include() would be probably more reliable, than a version check.

Like you mentioned, g++ 5 till 7 have experimental support. Including is no problem, but not forgetting to link requires some cmake changes, so I'd also just leave it as it was 😄

@The-EDev The-EDev merged commit 87cf68f into CrowCpp:master Aug 7, 2022
@erikaldsund erikaldsund deleted the cpp17_filesystem_usage_fixes branch August 15, 2022 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants