Title
Class template std::stack should be movable
Status
resolved
Section
[stack.defn]
Submitter
Daniel Krügler

Created on 2009-02-01.00:00:00 last changed 171 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

In the class stack synopsis of [stack.defn] insert:

template <class T, class Container = deque<T> >
class stack {
  [..]
  explicit stack(const Container&);
  explicit stack(Container&& = Container());
  stack(stack&& s) : c(std::move(s.c)) {}
  stack& operator=(stack&& s) { c = std::move(s.c); return *this; }
  [..]
};
Date: 2010-12-05.14:14:49

[ 2009-10 Santa Cruz: ]

Mark NAD EditorialResolved, addressed by issue 1194.

Date: 2009-08-23.00:00:00

[ 2009-08-23 Howard adds: ]

1194 also adds these move members using an editorially different style.

Date: 2009-08-18.00:00:00

[ 2009-08-18 Daniel updates the wording and Howard sets to Review. ]

Date: 2010-10-21.18:28:33

[ 2009-07 Frankfurt ]

Moved from Tentatively Ready to Open only because the wording needs to be tweaked for concepts removal.

Date: 2010-10-21.18:28:33

[ Batavia (2009-05): ]

We agree with the proposed resolution.

Move to Tentatively Ready.

Date: 2009-02-01.00:00:00

The synopsis given in [stack.defn] does not show up

requires MoveConstructible<Cont> stack(stack&&);
requires MoveAssignable<Cont> stack& operator=(stack&&);

although the other container adaptors do provide corresponding members.

History
Date User Action Args
2010-12-05 14:14:49adminsetstatus: nad editorial -> resolved
2010-10-21 18:28:33adminsetmessages: + msg4647
2010-10-21 18:28:33adminsetmessages: + msg4646
2010-10-21 18:28:33adminsetmessages: + msg4645
2010-10-21 18:28:33adminsetmessages: + msg4644
2010-10-21 18:28:33adminsetmessages: + msg4643
2010-10-21 18:28:33adminsetmessages: + msg4642
2009-02-01 00:00:00admincreate