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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user