astitcher commented on a change in pull request #315:
URL: https://github.com/apache/qpid-proton/pull/315#discussion_r639141389



##########
File path: c/tests/pn_test.hpp
##########
@@ -46,13 +46,14 @@ namespace pn_test {
 template <class T, void (*Free)(T *)> class auto_free {
   T *ptr_;
   auto_free &operator=(auto_free &x);
-  auto_free(auto_free &x);
+public:
+  auto_free(auto_free &x) = delete;
 
 public:
-  auto_free(T *p = 0) : ptr_(p) {}
+  explicit auto_free(T *p = 0) : ptr_(p) {}
   ~auto_free() { Free(ptr_); }
   T *get() const { return ptr_; }
-  operator T *() const { return ptr_; }
+  operator T *() const { return ptr_; } // not marking explicit for convenience

Review comment:
       Honestly I'm fine with putting this PR in as is and then moving it 
closer to good C++11 piece-by-piece
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to