astitcher commented on a change in pull request #315: URL: https://github.com/apache/qpid-proton/pull/315#discussion_r639002890
########## 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) {} Review comment: I don't think that explicit does anything useful here (not harmful though). The major (only?) reason to use explicit is to stop automatic conversions from integer types happening for templated types - this constructor takes a pointer so there is no chance of that happening - There's no harm in making this explicit though. ########## File path: c/tests/pn_test.hpp ########## @@ -129,7 +130,7 @@ struct handler { struct driver : public ::pn_connection_driver_t { struct handler &handler; - driver(struct handler &h); + explicit driver(struct handler &h); Review comment: As above I don't think this actually does anything, but it's not harmful at all. -- 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