jeudi 31 octobre 2019

no member named 'to_string' in namespace 'std' - when using C++11 compile option

I'm writing an Android Native-Activity App in Microsoft Visual Studio 2017, using the nhlomann json library, a header only library (nlohmann/json.hpp), which includes the std::to_string() function.

On compilation I get "no member named 'to_string' in namespace 'std' "

  • C++ language standard is defined as C++11
  • gnu-libstdc++ 4.9
  • is in the header file

Is the problem that gnu_libstdc++ 4.9 doesn't fully implement C++11?

As the code is a 3rd party library, I don't want to replace std::to_string() with my own template, and edit the library code (for maintainability reasons).

Any suggestions on how to get past this error?

Aucun commentaire:

Enregistrer un commentaire