I have a project that currently uses C++11/14, but it requires something like std::filesystem
, which is only available in C++17, and hence I don't have a chance to currently use it. I see, however, that it's available in my current compiler as std::experimental::filesystem
. Is it a good idea to use experimental features, assuming that I could in the future add something like:
#ifdef CXX17 //if this is C++17
std::filesystem::something ...;
#else
std::experimental::filesystem::something ...;
#endif
My concerns are:
1. Is it guaranteed that all compliant compilers have the same experimental features?
2. Are experimental features prone to big changes that make them unreliable?
Maybe there's more things to wonder about. Why should I or should I not use them? I'm puzzled with a new project and don't know what to decide.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…