Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9dcdcdee25
commit
b9d9fb4a17
@ -468,7 +468,7 @@ template <class _LhsDuration, class _RhsDuration>
|
||||
struct __duration_eq
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||
bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs)
|
||||
bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const
|
||||
{
|
||||
typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
|
||||
return _Ct(__lhs).count() == _Ct(__rhs).count();
|
||||
@ -479,7 +479,7 @@ template <class _LhsDuration>
|
||||
struct __duration_eq<_LhsDuration, _LhsDuration>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||
bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs)
|
||||
bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const
|
||||
{return __lhs.count() == __rhs.count();}
|
||||
};
|
||||
|
||||
@ -509,7 +509,7 @@ template <class _LhsDuration, class _RhsDuration>
|
||||
struct __duration_lt
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||
bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs)
|
||||
bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const
|
||||
{
|
||||
typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
|
||||
return _Ct(__lhs).count() < _Ct(__rhs).count();
|
||||
@ -520,7 +520,7 @@ template <class _LhsDuration>
|
||||
struct __duration_lt<_LhsDuration, _LhsDuration>
|
||||
{
|
||||
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
|
||||
bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs)
|
||||
bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const
|
||||
{return __lhs.count() < __rhs.count();}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user