Implement LWG 2773 - std::ignore should be constexpr.
In addition to the PR for LWG 2773 this patch also ensures
that each of std::ignores constructors or assignment operators
are constexpr.
llvm-svn: 294165
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 9af60c4a8b0132ec395c61c93f7d3e2af622a433
diff --git a/include/tuple b/include/tuple
index b48e2d6..f2a7472 100644
--- a/include/tuple
+++ b/include/tuple
@@ -1064,11 +1064,13 @@
struct __ignore_t
{
template <class _Tp>
- _LIBCPP_INLINE_VISIBILITY
- const __ignore_t& operator=(_Tp&&) const {return *this;}
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+ const __ignore_t& operator=(_Tp&&) const {return *this;}
};
-namespace { const __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>(); }
+namespace {
+ constexpr __ignore_t<unsigned char> ignore = __ignore_t<unsigned char>();
+}
template <class _Tp>
struct __make_tuple_return_impl