tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
gcc48: to_string not a member of std
Hi!
I wanted to compile some software using to_string on NetBSD with gcc-4.8.
It failed: "error: 'to_string' is not a member of 'std'"
After some guessing I found that bits/basic_string.h has:
#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) &&
!defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF))
But the installed /usr/include/g++/bits/x86_64/c++config.h has:
/* #undef _GLIBCXX_USE_C99 */
When I change that to
#define _GLIBCXX_USE_C99 1
I can compile software using to_string.
Running it is another matter:
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
but unsetting LC_* "fixes" that.
I think that's progress. Does anyone see a reason not to define
_GLIBCXX_USE_C99?
Thomas
Home |
Main Index |
Thread Index |
Old Index