This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std random


Benjamin Kosnik wrote:

> C++0x is only enabled via -std=gnu++0x, -std=c++0x. Users have to be
> proactive (use these flags) before this support is even visible.

Very good; that's what I was hoping.

As below, I think it might make sense to make it even more proactive, in
that users would have to say something like -std=c++0x -D_GLIBCXX_CPP0X
to active the features in the library, so that users could use the
language features without picking up the library features.

>> It may even make sense to distinguish between C++0x in the compiler
>> and C++0x in the library, in the sense that I might want to use C++0x
>> language features without using C++0x library features, for users who
>> want to preserve the ability to link with older libstdc++.
> 
> Linking 4.4.0 g++ code with an older libstdc++ is not, and has never
> been, supported. If I'm reading you correctly... this is certainly not
> something to be encouraged. Perhaps I've not understood you.

I was unclear; sorry.  What I meant was:

* I believe that the C++0x API/ABI in libstdc++ is likely to change
between 4.4.x and later releases.

* As a user, I might want to be able to build with 4.4.x, link with the
4.4.x library, but know that someday users could use my binaries with a
later version of the library.

* To do that, I want to avoid depending on the C++0x API/ABI, and depend
only on the more stable "traditional C++" API/ABI.  But, I might still
want to use C++0x language features in my application.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]