-2

I try to compile a piece of code with:

cl /c /std:c++latest /Gm- /sdl /Zc:inline /RTC1 /Oy /MDd /FA /EHs main.cxx

but I get this error:

error C2039: 'any': is not a member of 'std'

and I wonder how (if possible) can I get to have this feature. I don't see anything about it on their sites but knowing how much time they take to update them maybe it can be done

bMain
  • 324
  • 3
  • 11

2 Answers2

2

Yes, <any> has shipped with every release of VS 2017.

Casey
  • 41,449
  • 7
  • 95
  • 125
1

It is, but one has to make sure that the correct c++ version is used.

Right click the project and under Properties->C/C++->Language->C++ Language Standard make sure it is set to the correct one.

yoel halb
  • 12,188
  • 3
  • 57
  • 52