diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-06-28 18:09:35 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-06-28 18:09:35 +0000 |
commit | afe8b967cc196bb276078bbc3fe6a8381b7ecfbe (patch) | |
tree | 81bf535ebe3b430d80471b20a080d4b3af4436a5 | |
parent | 7ca071bcf6bda324c9c0371b4dbe42f76664c701 (diff) | |
download | bcm5719-llvm-afe8b967cc196bb276078bbc3fe6a8381b7ecfbe.tar.gz bcm5719-llvm-afe8b967cc196bb276078bbc3fe6a8381b7ecfbe.zip |
Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
llvm-svn: 185181
-rw-r--r-- | libcxx/include/chrono | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 3b96e8164e5..4ceb875c3f0 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -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();} }; |