No template named 'variant' in namespace 'std'

6.8k Views Asked by At

In XCode 10.3 I am getting the error message when I try to build -> No template named 'variant' in namespace 'std'

for the lines of code ->

#include <variant>
typedef std::variant<int,double,float,const char*,Mat,Scalar,cv::Point,cv::Size> ocvtypes;

In Build Settings I have tried setting the C++ Language Dialect and C++ Standard Library to different values including C++ 17 but to no avail. This worked before in an earlier version of XCode and the code and project have not changed so I am not sure why this is not working? Also it is finding the variant header file okay.

0

There are 0 best solutions below