diff options
author | Eric Fiselier <eric@efcs.ca> | 2017-02-06 04:25:31 +0300 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2017-02-06 04:25:31 +0300 |
commit | 9af60c4a8b0132ec395c61c93f7d3e2af622a433 (patch) | |
tree | 5585ac50b1ce175c45c2eddbead35c26f2ebd8bd /libcxx/include/tuple | |
parent | 75218fb6b1c979ce4891303c0cf2560639d68033 (diff) |
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
Diffstat (limited to 'libcxx/include/tuple')
-rw-r--r-- | libcxx/include/tuple | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libcxx/include/tuple b/libcxx/include/tuple index b48e2d619271..f2a74721921a 100644 --- a/libcxx/include/tuple +++ b/libcxx/include/tuple @@ -1064,11 +1064,13 @@ template <class _Up> 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 |