std::to_string()
Posted: Sat Dec 07, 2019 3:47 pm
In gcc 5.2.0 compiler, by default, when trying to use std::to_string(), you get an error
I found that if the following defines are enabled (added to Preprocessor) in gcc-5.2.0 (nndk 2.8.x)
For gcc 8.1.0 (nndk 3.0.0):
then the code compiles successfully. See attached screenshot (example from cppreference).
I don’t know why so far no one on the forum has asked about std::to_string(), because this function is convenient and needed in every project...
Maybe because it can throw an exception, and NetBurner consumers in most cases write code only for safety-critical projects in C-style without using any exceptions?
Code: Select all
error: 'to_string' is not a member of 'std'
Code: Select all
_GLIBCXX_USE_C99
_GLIBCXX_USE_C99_DYNAMIC
Code: Select all
_GLIBCXX_USE_C99_STDIO
I don’t know why so far no one on the forum has asked about std::to_string(), because this function is convenient and needed in every project...
Maybe because it can throw an exception, and NetBurner consumers in most cases write code only for safety-critical projects in C-style without using any exceptions?