> Neither g++ 7
Eh? I've been using it a hell of a lot!
std::variant is listed on GCC 7's page [0], and I know that is there in at least 7.1
I don't use clang much, but they list it as supported [1], and I believe the patch [2] landed in 5.0
[0] https://gcc.gnu.org/gcc-7/changes.html
Hmm, have to check include paths again!
So I glanced over this, and found that std::variant is in libc++, as you would expect, but in some cases, when you get a nice modern compiler, you might not end up with it linked to a nice modern stdlib.
So maybe some sort of mis-match got in your way.
Anyways, here's hoping you get to use C++17 in its full glory!
Neither g++ 7 nor Clang/LLVM 4.0.1 support std::variant yet :-(. We started a new (blank buffer) codebase earlier this year and decided to use C++17 as the implementation language, which has exposed us to the gaps...which are surprisingly few! But sadly this is one of them.