Repository: qpid-proton Updated Branches: refs/heads/0.12.x 334ac2f3c -> b1f461bf2
NO-JIRA: [C++ binding] Fix C++11 compile errors. [authored by aconway, modified by astitcher] [approved by by aconway] Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b1f461bf Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b1f461bf Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b1f461bf Branch: refs/heads/0.12.x Commit: b1f461bf2d329844d5e995bbd0e297f2998e13de Parents: 334ac2f Author: Alan Conway <[email protected]> Authored: Thu Jan 28 12:31:24 2016 -0500 Committer: Andrew Stitcher <[email protected]> Committed: Tue Feb 2 15:31:30 2016 -0500 ---------------------------------------------------------------------- proton-c/bindings/cpp/include/proton/endpoint.hpp | 17 ++++++++++++++--- proton-c/bindings/cpp/src/endpoint.cpp | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b1f461bf/proton-c/bindings/cpp/include/proton/endpoint.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/include/proton/endpoint.hpp b/proton-c/bindings/cpp/include/proton/endpoint.hpp index fd698b0..94814f1 100644 --- a/proton-c/bindings/cpp/include/proton/endpoint.hpp +++ b/proton-c/bindings/cpp/include/proton/endpoint.hpp @@ -21,6 +21,7 @@ * under the License. * */ +#include "proton/config.hpp" #include "proton/export.hpp" #include "proton/condition.hpp" #include "proton/comparable.hpp" @@ -30,6 +31,8 @@ namespace proton { /// The base class for session, connection, and link. class endpoint { public: + PN_CPP_EXTERN virtual ~endpoint(); + /// A bit mask of state bit values. /// /// A state mask is matched against an endpoint as follows: If the @@ -57,12 +60,20 @@ class endpoint { /// Get the error condition of the remote endpoint. virtual condition remote_condition() const = 0; - virtual ~endpoint() {} +#if PN_HAS_CPP11 + // Make everything explicit for C++11 compilers + endpoint() = default; + endpoint& operator=(const endpoint&) = default; + endpoint& operator=(endpoint&&) = default; + + endpoint(const endpoint&) = default; + endpoint(endpoint&&) = default; +#endif }; /// @cond INTERNAL /// XXX important to expose? - + template <class T> class iter_base : public comparable<iter_base<T> > { public: typedef T value_type; @@ -91,7 +102,7 @@ template<class I> class range { private: I begin_, end_; }; - + /// @endcond } http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b1f461bf/proton-c/bindings/cpp/src/endpoint.cpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/endpoint.cpp b/proton-c/bindings/cpp/src/endpoint.cpp index 5647c33..c1a589d 100644 --- a/proton-c/bindings/cpp/src/endpoint.cpp +++ b/proton-c/bindings/cpp/src/endpoint.cpp @@ -41,6 +41,8 @@ const int endpoint::REMOTE_CLOSED = PN_REMOTE_CLOSED; const int endpoint::LOCAL_MASK = PN_LOCAL_MASK; const int endpoint::REMOTE_MASK = PN_REMOTE_MASK; +endpoint::~endpoint() {} + session_iterator session_iterator::operator++() { ptr_ = ptr_.next(state_); return *this; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
