You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/12/20 04:07:55 UTC

[trafficserver] branch 7.1.x updated (67d52a1 -> 2689e7b)

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a change to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git.


    from 67d52a1  Update CHANGELOG
     new f16b7ad  Cleanup of bool conversion in Ptr.h for C++11.
     new 2689e7b  Updated CHANGELOG and STATUS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG-7.1.2    |  1 +
 STATUS             |  5 +++++
 lib/ts/Ptr.h       | 14 +++++---------
 lib/ts/test_Ptr.cc |  2 +-
 4 files changed, 12 insertions(+), 10 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].

[trafficserver] 02/02: Updated CHANGELOG and STATUS

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 2689e7b57702ae2cda0323caa51f1a38224d3c55
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Tue Dec 19 21:07:46 2017 -0700

    Updated CHANGELOG and STATUS
---
 CHANGELOG-7.1.2 | 1 +
 STATUS          | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/CHANGELOG-7.1.2 b/CHANGELOG-7.1.2
index 2d71144..8c12f3f 100644
--- a/CHANGELOG-7.1.2
+++ b/CHANGELOG-7.1.2
@@ -26,6 +26,7 @@ Changes with Apache Traffic Server 7.1.2
   #2658 - Fix the implementation of Http2DependencyTree
   #2661 - For 7.1.x: move http 408 response logic into transaction
   #2665 - Checking the retval of safe_getsockname() and safe_getpeername()
+  #2672 - Cleanup of bool conversion in Ptr.h for C++11.
   #2673 - CID 1196423: Error handling issues  (CHECKED_RETURN)
   #2677 - Issue with null ua_buffer_reader due to PR #2123
   #2699 - malformed chunked responses will be cached under some terrible network circumstances
diff --git a/STATUS b/STATUS
index e1adc58..c9e4c28 100644
--- a/STATUS
+++ b/STATUS
@@ -6,7 +6,12 @@ The current version of this file can be found at:
   * https://github.com/apache/trafficserver/blob/master/STATUS
 
 Release history:
+    7.1.2           : Released on Dec 26th, 2017
+    7.1.1           : Released on Sep 7th, 2017
+    7.1.0           : Released on Jul 24th, 2017
 
+    6.2.2           : Released on Aug 10th, 2016
+    6.2.1           : Released on Jan 20th, 2017
     6.2.0           : Released on Jul 25th, 2016
     6.1.1           : Released on Feb 8th, 2016
     6.1.0           : Released on Jan 26th, 2016

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.

[trafficserver] 01/02: Cleanup of bool conversion in Ptr.h for C++11.

Posted by zw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit f16b7ad794a9a3fae7aa327ceddb5e948fa33b92
Author: Walt Karas <wk...@yahoo-inc.com>
AuthorDate: Mon Oct 16 21:32:42 2017 +0000

    Cleanup of bool conversion in Ptr.h for C++11.
    
    (cherry picked from commit e8f7a859e54f6ac68af63b754524d45502fb8d80)
---
 lib/ts/Ptr.h       | 14 +++++---------
 lib/ts/test_Ptr.cc |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/lib/ts/Ptr.h b/lib/ts/Ptr.h
index ad8f9fb..fdae759 100644
--- a/lib/ts/Ptr.h
+++ b/lib/ts/Ptr.h
@@ -1,6 +1,6 @@
 /** @file
 
-  A brief file description
+  Reference-counting shared pointer, like std::shared_ptr.
 
   @section license License
 
@@ -100,13 +100,6 @@ private:
 ////////////////////////////////////////////////////////////////////////
 template <class T> class Ptr
 {
-  // https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Safe_bool.
-  typedef void (Ptr::*bool_type)() const;
-  void
-  this_type_does_not_support_comparisons() const
-  {
-  }
-
 public:
   explicit Ptr(T *p = 0);
   Ptr(const Ptr<T> &);
@@ -118,7 +111,10 @@ public:
 
   T *operator->() const { return (m_ptr); }
   T &operator*() const { return (*m_ptr); }
-  operator bool_type() const { return m_ptr ? &Ptr::this_type_does_not_support_comparisons : 0; }
+
+  // Making this explicit avoids unwanted conversions.  See https://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Safe_bool .
+  explicit operator bool() const { return m_ptr != nullptr; }
+
   int
   operator==(const T *p)
   {
diff --git a/lib/ts/test_Ptr.cc b/lib/ts/test_Ptr.cc
index 9392bf2..9acd4c8 100644
--- a/lib/ts/test_Ptr.cc
+++ b/lib/ts/test_Ptr.cc
@@ -95,5 +95,5 @@ REGRESSION_TEST(Ptr_bool)(RegressionTest *t, int /* atype ATS_UNUSED */, int *ps
   Ptr<PtrObject> some = make_ptr(new PtrObject(&alive));
 
   box.check(!none, "Empty Ptr<T> is false");
-  box.check(some, "Non-empty Ptr<T> is true");
+  box.check(bool(some), "Non-empty Ptr<T> is true");
 }

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.