diff options
| author | Marshall Clow <mclow.lists@gmail.com> | 2017-01-24 23:09:12 +0000 |
|---|---|---|
| committer | Marshall Clow <mclow.lists@gmail.com> | 2017-01-24 23:09:12 +0000 |
| commit | 63b560be69c0660b427efe903689f410e1f02967 (patch) | |
| tree | 0f5df4aa86b5886bb710a1465dd2f1a81e24ac8b /libcxx/include/queue | |
| parent | b10fb96541bc45aea71c8652bb1786899826f7ad (diff) | |
| download | bcm5719-llvm-63b560be69c0660b427efe903689f410e1f02967.tar.gz bcm5719-llvm-63b560be69c0660b427efe903689f410e1f02967.zip | |
Change the return type of emplace_[front|back] back to void when building with C++14 or before. Resolves PR31680.
llvm-svn: 292990
Diffstat (limited to 'libcxx/include/queue')
| -rw-r--r-- | libcxx/include/queue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/include/queue b/libcxx/include/queue index 271c203e1d2..57d420c7406 100644 --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -63,7 +63,7 @@ public: void push(const value_type& v); void push(value_type&& v); - template <class... Args> reference emplace(Args&&... args); + template <class... Args> reference emplace(Args&&... args); // reference in C++17 void pop(); void swap(queue& q) noexcept(is_nothrow_swappable_v<Container>) @@ -292,8 +292,13 @@ public: #ifndef _LIBCPP_HAS_NO_VARIADICS template <class... _Args> _LIBCPP_INLINE_VISIBILITY +#if _LIBCPP_STD_VER > 14 reference emplace(_Args&&... __args) { return c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#else + void emplace(_Args&&... __args) + { c.emplace_back(_VSTD::forward<_Args>(__args)...);} +#endif #endif // _LIBCPP_HAS_NO_VARIADICS #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES _LIBCPP_INLINE_VISIBILITY |

