-
Notifications
You must be signed in to change notification settings - Fork 36.4k
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
C++17 std::fs #20460
Comments
If this would require just one more package to the
|
@vasild I believe, you need to add It seems it is important where the flag is placed (at least on my Ubuntu 18.04 & gcc-8): // This is simple "main.cpp" file to test compiling of a program with std::filesystem on gcc-8.
// Ubuntu 18.04
// works: g++-8 --std=c++17 main.cpp -lstdc++fs
// does not work: g++-8 --std=c++17 -lstdc++fs main.cpp
#include <string>
#include <iostream>
#include <filesystem>
namespace fs = std::filesystem;
int main()
{
std::string path = "C:\\cpp_filesystem";
for (auto & p : fs::directory_iterator(path))
std::cout << p << std::endl;
} It would be great if somebody could verify my claim though. Some resources: |
Concept ACK. |
@promag I was unlucky to go through link phase when doing:
on It would be great help resolving this. Note: It has helped me to add manually in the generated makefile bitcoin-cli$(EXEEXT): $(bitcoin_cli_OBJECTS) $(bitcoin_cli_DEPENDENCIES) $(EXTRA_bitcoin_cli_DEPENDENCIES)
@rm -f bitcoin-cli$(EXEEXT)
$(AM_V_CXXLD)$(bitcoin_cli_LINK) $(bitcoin_cli_OBJECTS) $(bitcoin_cli_LDADD) $(LIBS) -lstdc++fs |
@kiminuo oh it also happens just linking. |
Concept ACK |
Concept ACK I gather gcc 9 does not require |
|
I will put together some changes for this 📁 . |
Concept ACK |
We've had reports of people unable to compile because of outdated compilers that can't handle the C++17 in our master branch. Once the 22.0 release is out, we might get more complaints about that. I think bumping the compiler versions even higher for the 22.0 release might be a bit too aggressive and rushed. Assigned 23.0 for now, so that we can collect some feedback after the 22.0 release. |
Any further discussion can be done in the pull |
C++17 std::fs would be useful for a stronger rename method (#20435) and dropping boost fs in favor of the stdlib (#20744).
However, we currently use bionic to compile gitian binaries, which uses gcc-7 by default. If we are ok switching to gcc-8 on bionic for our gitian builds and everyone compiling from source on bionic, we could start using std::fs
The text was updated successfully, but these errors were encountered: