From 43f25c391932a1b4446006169ad2d9f99252956a Mon Sep 17 00:00:00 2001 From: dim Date: Tue, 28 May 2013 20:11:28 +0000 Subject: Fix warnings from newer clang versions about constexpr member functions not being implicitly const in libc++'s header. The warnings have been introduced because of new language rules recently adopted by the C++ WG. More info: MFC after: 3 days --- contrib/libc++/include/chrono | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/libc++/include') diff --git a/contrib/libc++/include/chrono b/contrib/libc++/include/chrono index 3b96e816..4ceb875 100644 --- a/contrib/libc++/include/chrono +++ b/contrib/libc++/include/chrono @@ -468,7 +468,7 @@ template 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 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 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 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();} }; -- cgit v1.1