std::pair and move-only types in C++0x ?

S

SG

Just a quick question:

Are std::pair and std::tuple (C++0x) supposed to support move-only
types?

It sure looks like they don't judging by N3126.pdf. But I can hardly
believe this. I was expecting to be able to put a std::unique_ptr into
a std::map as mapped type.

If I recall correctly someone's working on a refined pair/tuple
specification to fix some other errors in the current proposal. It
would be great to hear from that someone or anybody else involved.

TIA,
Sebastian
 
H

Howard Hinnant

Just a quick question:

Are std::pair and std::tuple (C++0x) supposed to support move-only
types?
Yes.

It sure looks like they don't judging by N3126.pdf. But I can hardly
believe this. I was expecting to be able to put a std::unique_ptr into
a std::map as mapped type.

Me too.
If I recall correctly someone's working on a refined pair/tuple
specification to fix some other errors in the current proposal. It
would be great to hear from that someone or anybody else involved.

Daniel Krügler

His paper will be publicly published here as N3140:

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/

around Oct. 20 or 21.

-Howard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top