mpark / variant

C++17 `std::variant` for C++11/14/17
https://mpark.github.io/variant
Boost Software License 1.0
664 stars 87 forks source link

c++17 and CI issue #62

Closed GillianGrayson closed 5 years ago

GillianGrayson commented 5 years ago

Hi! Thanks for sharing such useful lib!

I have a question about c++17 standard and your CI (Travis and Appveyor) settings. In c++17 filesystem was introdused:

include

namespace fs = std::filesystem;

I just add this include and simple call to your lib to test how your CI settings works with it and with c++17 at all. But I obtain errors in all builds in CI: fatal error: 'filesystem' file not found

include

     ^

I created fork from your repo, added it to my Travis and Appveyor, and added this simple commit to my master with filesystem usage. https://github.com/GillianGrayson/variant https://travis-ci.org/GillianGrayson/variant https://ci.appveyor.com/project/GillianGrayson/variant

Can you help me please to fix this issue with CI + c++17 (filesystem)?

Thank you!

mpark commented 5 years ago

According to https://en.cppreference.com/w/cpp/compiler_support, it seems like <filesystem> is available starting GCC 8, and Clang 7. For GCC, you'll have to remove all of the GCC versions < 8 from .travis.yml, and remove < C++17 configs from GCC 8 from .travis.yml as well.

mpark commented 5 years ago

The Clang configs don't use libc++ today. It simply uses the default libstdc++. As such, you might need to add g++-8 as a dependency in your Clang configs. I hope that helps!