Created on 2007-10-31.00:00:00 last changed 169 months ago
Rationale:
Addressed by N2680 Proposed Wording for Placement Insert (Revision 1).
Proposed resolution:
Change [queue.defn]:
void push(const value_type& x) { c.push_back(x); }void push(value_type&& x) { c.push_back(std::move(x)); }template<class... Args> void push(Args&&... args) { c.push_back(std::forward<Args>(args)...); }
Change [priority.queue]:
void push(const value_type& x) { c.push_back(x); }void push(value_type&& x) { c.push_back(std::move(x)); }template<class... Args> void push(Args&&... args) { c.push_back(std::forward<Args>(args)...); }
Change [priqueue.members]:
void push(const value_type& x);
Effects:c.push_back(x);push_heap(c.begin(), c.end(), comp);template<class... Args> void push(value_typeArgs&&...xargs);Effects:
c.push_back(std::moveforward<Args>(xargs)...); push_heap(c.begin(), c.end(), comp);
Change [stack.defn]:
void push(const value_type& x) { c.push_back(x); }void push(value_type&& x) { c.push_back(std::move(x)); }template<class... Args> void push(Args&&... args) { c.push_back(std::forward<Args>(args)...); }
[ Related to 767 ]
After n2369 we have a single push_back overload in the sequence containers, of the "emplace" type. At variance with that, still in n2461, we have two separate overloads, the C++03 one + one taking an rvalue reference in the container adaptors. Therefore, simply from a consistency point of view, I was wondering whether the container adaptors should be aligned with the specifications of the sequence container themselves: thus have a single push along the lines:
template<typename... _Args> void push(_Args&&... __args) { c.push_back(std::forward<_Args>(__args)...); }
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-12-05 14:14:49 | admin | set | status: nad editorial -> resolved |
2010-10-21 18:28:33 | admin | set | messages: + msg3667 |
2010-10-21 18:28:33 | admin | set | messages: + msg3666 |
2010-10-21 18:28:33 | admin | set | messages: + msg3665 |
2007-10-31 00:00:00 | admin | create |