Repository: qpid-proton Updated Branches: refs/heads/master ab54cb706 -> ab6b74732
PROTON-1232: [C++ binding] Fix build failures with some earlier gcc versions Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/ab6b7473 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/ab6b7473 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/ab6b7473 Branch: refs/heads/master Commit: ab6b7473205e943a1eecd588774380f9ce6e0bbb Parents: ab54cb7 Author: Andrew Stitcher <[email protected]> Authored: Tue Jun 14 16:52:34 2016 -0400 Committer: Andrew Stitcher <[email protected]> Committed: Tue Jun 14 17:03:26 2016 -0400 ---------------------------------------------------------------------- proton-c/bindings/cpp/include/proton/default_container.hpp | 8 ++++---- proton-c/bindings/cpp/src/container_impl.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ab6b7473/proton-c/bindings/cpp/include/proton/default_container.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/include/proton/default_container.hpp b/proton-c/bindings/cpp/include/proton/default_container.hpp index 9934be7..ccd5e74 100644 --- a/proton-c/bindings/cpp/include/proton/default_container.hpp +++ b/proton-c/bindings/cpp/include/proton/default_container.hpp @@ -34,7 +34,7 @@ namespace proton { class messaging_handler; // Avoid deprecated diagnostics from auto_ptr -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) && __GNUC__*100 + __GNUC_MINOR__ >= 406 || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif @@ -57,12 +57,12 @@ public: #else class default_container : public container_ref<std::auto_ptr<container> > { public: - default_container(messaging_handler& h, const std::string& id="") : container_ref(make_auto_default_container(h, id)) {} - default_container(const std::string& id="") : container_ref(make_auto_default_container(id)) {} + default_container(messaging_handler& h, const std::string& id="") : container_ref<std::auto_ptr<container> >(make_auto_default_container(h, id)) {} + default_container(const std::string& id="") : container_ref<std::auto_ptr<container> >(make_auto_default_container(id)) {} }; #endif -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) && __GNUC__*100 + __GNUC_MINOR__ >= 406 || defined(__clang__) #pragma GCC diagnostic pop #endif http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ab6b7473/proton-c/bindings/cpp/src/container_impl.cpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/container_impl.cpp b/proton-c/bindings/cpp/src/container_impl.cpp index 163a801..7496dc4 100644 --- a/proton-c/bindings/cpp/src/container_impl.cpp +++ b/proton-c/bindings/cpp/src/container_impl.cpp @@ -345,7 +345,7 @@ std::unique_ptr<container> make_default_container(const std::string& id) { #endif // Avoid deprecated diagnostics from auto_ptr -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) && __GNUC__*100 + __GNUC_MINOR__ >= 406 || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif @@ -357,7 +357,7 @@ std::auto_ptr<container> make_auto_default_container(const std::string& id) { return std::auto_ptr<container>(new container_impl(id)); } -#if defined(__GNUC__) || defined(__clang__) +#if defined(__GNUC__) && __GNUC__*100 + __GNUC_MINOR__ >= 406 || defined(__clang__) #pragma GCC diagnostic pop #endif } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
