Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2013 20:11:28 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251066 - head/contrib/libc++/include
Message-ID:  <201305282011.r4SKBSia026143@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue May 28 20:11:28 2013
New Revision: 251066
URL: http://svnweb.freebsd.org/changeset/base/251066

Log:
  Fix warnings from newer clang versions about constexpr member functions
  not being implicitly const in libc++'s <chrono> header.  The warnings
  have been introduced because of new language rules recently adopted by
  the C++ WG.  More info:
  
  <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2013/n3598.html>;
  
  MFC after:	3 days

Modified:
  head/contrib/libc++/include/chrono

Modified: head/contrib/libc++/include/chrono
==============================================================================
--- head/contrib/libc++/include/chrono	Tue May 28 18:51:30 2013	(r251065)
+++ head/contrib/libc++/include/chrono	Tue May 28 20:11:28 2013	(r251066)
@@ -468,7 +468,7 @@ template <class _LhsDuration, class _Rhs
 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 _Rhs
 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();}
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305282011.r4SKBSia026143>