Repository: qpid-proton Updated Branches: refs/heads/master 398f786ba -> 38b27b503
PROTON-1557: c++ fix returned<> template windows link problems Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/69a99dd0 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/69a99dd0 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/69a99dd0 Branch: refs/heads/master Commit: 69a99dd0b82801d2c0bba6e30871f2c50f4bf74b Parents: 398f786 Author: Alan Conway <acon...@redhat.com> Authored: Tue Aug 29 09:43:20 2017 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Tue Aug 29 09:59:01 2017 -0400 ---------------------------------------------------------------------- proton-c/bindings/cpp/include/proton/returned.hpp | 9 ++++++--- proton-c/bindings/cpp/src/returned.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/69a99dd0/proton-c/bindings/cpp/include/proton/returned.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/include/proton/returned.hpp b/proton-c/bindings/cpp/include/proton/returned.hpp index 25b5c91..28c45a0 100644 --- a/proton-c/bindings/cpp/include/proton/returned.hpp +++ b/proton-c/bindings/cpp/include/proton/returned.hpp @@ -22,11 +22,14 @@ * */ +#include "./internal/export.hpp" #include "./internal/object.hpp" + #include "./connection.hpp" #include "./receiver.hpp" #include "./sender.hpp" + /// @file /// Return type for container functions @@ -45,14 +48,14 @@ template <class T> class factory; /// can access the value in @ref messaging_handler functions. /// template <class T> -class returned +class PN_CPP_CLASS_EXTERN returned { public: - operator T() const; + PN_CPP_EXTERN returned(const T&); + PN_CPP_EXTERN operator T() const; private: typename T::pn_type* ptr_; - returned(const T&); returned& operator=(const returned&); template <class U> friend class internal::factory; }; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/69a99dd0/proton-c/bindings/cpp/src/returned.cpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/returned.cpp b/proton-c/bindings/cpp/src/returned.cpp index 2e1a4b2..a6c6101 100644 --- a/proton-c/bindings/cpp/src/returned.cpp +++ b/proton-c/bindings/cpp/src/returned.cpp @@ -19,6 +19,8 @@ #include "proton_bits.hpp" +#include <proton/internal/export.hpp> + #include <proton/returned.hpp> #include <proton/connection.hpp> #include <proton/sender.hpp> @@ -26,9 +28,11 @@ namespace proton { -template <class T> returned<T>::returned(const T& t) : ptr_(unwrap(t)) {} +template <class T> PN_CPP_EXTERN returned<T>::returned(const T& t) : ptr_(unwrap(t)) {} + +//template <class T> PN_CPP_EXTERN returned<T>::returned(const returned<T>& x) : ptr_(x.ptr_) {} -template <class T> returned<T>::operator T() const { +template <class T> PN_CPP_EXTERN returned<T>::operator T() const { return internal::factory<T>::wrap(ptr_); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org