This is the mail archive of the 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: [c++0x] unique_ptr.hpp implementation

On 8/18/07, Paolo Carlini <> wrote:
> ... and, certainly we don't want this in the tuple in std::tr1:
>         _Head_base(_Head && __h) : _M_head_impl(forward<_Head>(__h)) {  }
> #endif
> as you can see, we have now infrastructure for separate TR1 and C++0x
> implementations of such facilities. For compatibility reasons too, I
> would probably suggest, in such case, to leave the TR1 version alone and
> modify the C++0x version only (that in /include/std, to be clear)

Question on this. Say I want to implement std::pair for c++0x (w/ move
ctors, tuple interface etc.) . Whats the proper way to add a new pair
definition for c++0x? Extend current one in bits/stl_pair.h somehow
tr1_impl/utility wrapped in some ifdef? Add directly to std/utility
(if so, how do you avoid redefinition errors?) ?

I dont fully understand the tr1_impl stuff. Its tr1 standard
implemented with c++0x features right? Is it suppose to be c++0x
standard as well?

I can't seem to find a combination of #ifdef's and code placement that
doesn't violate ODR or cause pair to be undefined in places it should
be available.


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