diff options
author | Eric Fiselier <eric@efcs.ca> | 2016-04-21 23:38:59 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2016-04-21 23:38:59 +0000 |
commit | f07dd8d0a925dd8cbde7bb6198c1ba92446110ea (patch) | |
tree | 581032748ea2b3640d2e7f033f2e651eb67416bd /libcxx/include/stack | |
parent | c89755e4cbad7a46d747f3b2d49c50a80855a801 (diff) | |
download | bcm5719-llvm-f07dd8d0a925dd8cbde7bb6198c1ba92446110ea.tar.gz bcm5719-llvm-f07dd8d0a925dd8cbde7bb6198c1ba92446110ea.zip |
Add is_swappable/is_nothrow_swappable traits
llvm-svn: 267079
Diffstat (limited to 'libcxx/include/stack')
-rw-r--r-- | libcxx/include/stack | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libcxx/include/stack b/libcxx/include/stack index 64fd65215d9..48b3b0d16ec 100644 --- a/libcxx/include/stack +++ b/libcxx/include/stack @@ -58,7 +58,7 @@ public: template <class... Args> void emplace(Args&&... args); void pop(); - void swap(stack& c) noexcept(noexcept(swap(c, q.c))); + void swap(stack& c) noexcept(is_nothrow_swappable_v<Container>) }; template <class T, class Container> @@ -275,7 +275,10 @@ operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y) template <class _Tp, class _Container> inline _LIBCPP_INLINE_VISIBILITY -void +typename enable_if< + __is_swappable<_Container>::value, + void +>::type swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y) _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y))) { |