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: Weird (unintuitive?) behavior of std::tuple


On 10/31/2010 12:52 PM, Alex Dubov wrote:
> Indeed, the behavior of pair is identical (and, as such, counter-
> intuitive). pair<B, C> xx(B(), C()) won't invoke the constructors at all,
> just like tuple (but will invoke the non-default ones, if those were
> specified).
>   
Did you actually try to compile the snippet I proposed? Did you pay
attention to the error message? I suspect you are still a bit confused
about the actual semantics of the line above.

Paolo.


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