How to build UE4.22 Plugins with C++17?

I have Set the CppStandard variable in my Target.cs files to CppStandVersion.Cpp17. I have set PCHUsage to PCHUsageMode.NoSharedPCHs as one answer said to here on UE4 AnserHub. But when I add #include and the line std::variant Test =0.0; I get an error saying no template named variant exists in std. What else do I need to do in order to build plugins against the c++17 standard with ue 4.22? Thanks for the help.

This is just my guess i never changed standard, but the .cs change only may change compiler settting so it only applys C++17 syntax. It may not change include path to new standard library as normally you should not use it with UE4. I think you could raport it as bug, but expect that you might get “Please use UE4 APIs” response, so explain them why you need to use it in bug raport.