+2007-10-31 Paolo Carlini <pcarlini@suse.de>
+
+ * include/bits/stl_queue.h (queue<>::push(value_type&&)): Replace
+ with "emplace" version per DR 756.
+ (priority_queue<>::push(value_type&&)): Likewise.
+ * include/bits/stl_stack.h (stack<>::push(value_type&&)): Likewise.
+
2007-10-30 Paolo Carlini <pcarlini@suse.de>
* include/tr1_impl/random (uniform_int<>::
* to it. The time complexity of the operation depends on the
* underlying sequence.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push(const value_type& __x)
{ c.push_back(__x); }
-
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- void
- push(value_type&& __x)
- { c.push_back(std::move(__x)); }
+#else
+ // NB: DR 756.
+ template<typename... _Args>
+ void
+ push(_Args&&... __args)
+ { c.push_back(std::forward<_Args>(__args)...); }
#endif
/**
* The time complexity of the operation depends on the underlying
* sequence.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push(const value_type& __x)
{
c.push_back(__x);
std::push_heap(c.begin(), c.end(), comp);
}
-
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- void
- push(value_type&& __x)
- {
- c.push_back(std::move(__x));
- std::push_heap(c.begin(), c.end(), comp);
- }
+#else
+ // NB: DR 756.
+ template<typename... _Args>
+ void
+ push(_Args&&... __args)
+ {
+ c.push_back(std::forward<_Args>(__args)...);
+ std::push_heap(c.begin(), c.end(), comp);
+ }
#endif
/**
* to it. The time complexity of the operation depends on the
* underlying sequence.
*/
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
void
push(const value_type& __x)
{ c.push_back(__x); }
-
-#ifdef __GXX_EXPERIMENTAL_CXX0X__
- void
- push(value_type&& __x)
- { c.push_back(std::move(__x)); }
+#else
+ // NB: DR 756.
+ template<typename... _Args>
+ void
+ push(_Args&&... __args)
+ { c.push_back(std::forward<_Args>(__args)...); }
#endif
/**