Using __gnu_cxx::__vstring everywhere
Oleg Smolsky
oleg.smolsky@riverbed.com
Fri Dec 20 00:35:00 GMT 2013
On 2013-12-18 17:23, Jonathan Wakely wrote:
> On 18 December 2013 04:14, Oleg Smolsky wrote:
>> OK I've replaced std::string with a different (conforming) implementation
>> which happens to use C++11 features. This is fine for our usecase as all C++
>> users specify -std=c++11.
>>
>> My question is as follows: is it possible to force g++ to default to that
>> dialect? What do I need to hack?
> (That's not really a libstdc++ question).
You are right, of course. Yet the thread is about how libstdc++
operates: my private build only works in C++11 mode and this is not
friendly to the users. (I have no need for backwards compatibility, so I
would like to patch the dialect. This is how Microsoft compilers operate
too, BTW)
> You might be able to do it with a spec file, or if you are happy to
> change the code then see the variable cxx_dialect defined in
> gcc/c-family/c-common.c
Right, I found this thing a couple of days ago and patched it. Yet, the
option didn't graft, somehow. I am missing something.
So, the following invocation produces errors due to C++11 code in
std::thread:
.../bin/x86_64-unknown-linux-g++ -o future future-test.cc
The full dialect spec works, as it has, as always:
.../bin/x86_64-unknown-linux-g++ -o future future-test.cc -std=c++11
What is this spec thing? It must be overwriting the value during
initialization...
Thanks!
Oleg.
More information about the Libstdc++
mailing list