mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-23 10:07:41 +08:00
Implement P0084r2. Changing emplace return types.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276230 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
void push(const value_type& x);
|
||||
void push(value_type&& x);
|
||||
template <class... Args> void emplace(Args&&... args);
|
||||
template <class... Args> reference emplace(Args&&... args);
|
||||
void pop();
|
||||
|
||||
void swap(stack& c) noexcept(is_nothrow_swappable_v<Container>)
|
||||
@@ -199,8 +199,8 @@ public:
|
||||
#ifndef _LIBCPP_HAS_NO_VARIADICS
|
||||
template <class... _Args>
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
void emplace(_Args&&... __args)
|
||||
{c.emplace_back(_VSTD::forward<_Args>(__args)...);}
|
||||
reference emplace(_Args&&... __args)
|
||||
{ return c.emplace_back(_VSTD::forward<_Args>(__args)...);}
|
||||
#endif // _LIBCPP_HAS_NO_VARIADICS
|
||||
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||
_LIBCPP_INLINE_VISIBILITY
|
||||
|
Reference in New Issue
Block a user