std::optional is more-or-less avialable in Xcode 10.3, with the language dialect set to C++17, but not if the deployment target is less than iOS 12. std::optional is availble, but not value() methods of the class.
I don't understand why a particular iOS runtime is needed to support something in the C++ standard (template) library.
We can't give up support for iOS 11 until well after iOS 13 is out.
I've seen some stuff around setting
This seems to be defined by Xcode as
Is there really no way to get full optional support AND target iOS 11.x?
I experienced the same. The check in this case is too strict since optional is an header only library so it should be available indenpendently of the avaiable runtime, and compilation would fail anyway. Just looking at where the macro is defined I discovered you can just define:
to disable the availability mechanism as a whole, effectively working around the problem.
By the way, I recommend you to post your development questions also to StackOverflow to have more chances to find answers quickly. It's so unconfortable to find posts on forum with exactly the same problem and zero answers.