PROTON-1527: [C++ binding] Fix C++ auto selection for VS 2010

Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b09e4720
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b09e4720
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b09e4720

Branch: refs/heads/go1
Commit: b09e472038b62b3fda2072fca9d870e894b309d9
Parents: 674d1e2
Author: Andrew Stitcher <astitc...@apache.org>
Authored: Tue Oct 10 17:10:31 2017 -0400
Committer: Andrew Stitcher <astitc...@apache.org>
Committed: Tue Oct 10 17:10:31 2017 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/container.hpp  |  2 +-
 proton-c/bindings/cpp/include/proton/work_queue.hpp | 10 +++++-----
 proton-c/bindings/cpp/src/container.cpp             |  2 +-
 proton-c/bindings/cpp/src/work_queue.cpp            |  4 ++--
 4 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b09e4720/proton-c/bindings/cpp/include/proton/container.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/container.hpp 
b/proton-c/bindings/cpp/include/proton/container.hpp
index 58a3737..f0f5bc6 100644
--- a/proton-c/bindings/cpp/include/proton/container.hpp
+++ b/proton-c/bindings/cpp/include/proton/container.hpp
@@ -308,7 +308,7 @@ class PN_CPP_CLASS_EXTERN container {
     /// @cond INTERNAL
     /// This is a hack to ensure that the C++03 version is declared
     /// only during the compilation of the library
-#if PN_CPP_HAS_LAMBDAS && defined(qpid_proton_cpp_EXPORTS)
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && 
defined(qpid_proton_cpp_EXPORTS)
     PN_CPP_EXTERN void schedule(duration dur, v03::work fn);
 #endif
     /// @endcond

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b09e4720/proton-c/bindings/cpp/include/proton/work_queue.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/work_queue.hpp 
b/proton-c/bindings/cpp/include/proton/work_queue.hpp
index cafe0cf..f4b259f 100644
--- a/proton-c/bindings/cpp/include/proton/work_queue.hpp
+++ b/proton-c/bindings/cpp/include/proton/work_queue.hpp
@@ -64,7 +64,7 @@ class work {
 };
 }
 
-#if PN_CPP_HAS_LAMBDAS
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
 namespace v11 {
 class work {
   public:
@@ -90,7 +90,7 @@ class work {
 }
 #endif
 
-#if PN_CPP_HAS_LAMBDAS
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
 using v11::work;
 #else
 using v03::work;
@@ -140,7 +140,7 @@ class PN_CPP_CLASS_EXTERN work_queue {
     /// @cond INTERNAL
     /// This is a hack to ensure that the C++03 version is declared
     /// only during the compilation of the library
-#if PN_CPP_HAS_LAMBDAS && defined(qpid_proton_cpp_EXPORTS)
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && 
defined(qpid_proton_cpp_EXPORTS)
     PN_CPP_EXTERN bool add(v03::work fn);
 #endif
     /// @endcond
@@ -158,7 +158,7 @@ class PN_CPP_CLASS_EXTERN work_queue {
     /// @cond INTERNAL
     /// This is a hack to ensure that the C++03 version is declared
     /// only during the compilation of the library
-#if PN_CPP_HAS_LAMBDAS && defined(qpid_proton_cpp_EXPORTS)
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES && 
defined(qpid_proton_cpp_EXPORTS)
     PN_CPP_EXTERN void schedule(duration, v03::work fn);
 #endif
     /// @endcond
@@ -178,7 +178,7 @@ class PN_CPP_CLASS_EXTERN work_queue {
 
 // Utilities to make injecting functions/member functions palatable in C++03
 // Lots of repetition to handle functions with up to 3 arguments
-#if !PN_CPP_HAS_LAMBDAS
+#if !PN_CPP_HAS_LAMBDAS || !PN_CPP_HAS_VARIADIC_TEMPLATES
 template <class R>
 struct work0 : public proton::void_function0 {
     R (* fn_)();

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b09e4720/proton-c/bindings/cpp/src/container.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/container.cpp 
b/proton-c/bindings/cpp/src/container.cpp
index 2641daa..659ba01 100644
--- a/proton-c/bindings/cpp/src/container.cpp
+++ b/proton-c/bindings/cpp/src/container.cpp
@@ -112,7 +112,7 @@ returned<receiver> container::open_receiver(
 std::string container::id() const { return impl_->id(); }
 
 void container::schedule(duration d, v03::work f) { return impl_->schedule(d, 
f); }
-#if PN_CPP_HAS_LAMBDAS
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
 void container::schedule(duration d, v11::work f) { return impl_->schedule(d, 
f); }
 #endif
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b09e4720/proton-c/bindings/cpp/src/work_queue.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/work_queue.cpp 
b/proton-c/bindings/cpp/src/work_queue.cpp
index acb3ae8..7ec072e 100644
--- a/proton-c/bindings/cpp/src/work_queue.cpp
+++ b/proton-c/bindings/cpp/src/work_queue.cpp
@@ -43,7 +43,7 @@ bool work_queue::add(v03::work f) {
     return impl_->add(f);
 }
 
-#if PN_CPP_HAS_LAMBDAS
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
 bool work_queue::add(v11::work f) {
     // If we have no actual work queue, then can't defer
     if (!impl_) return false;
@@ -57,7 +57,7 @@ void work_queue::schedule(duration d, v03::work f) {
     return impl_->schedule(d, f);
 }
 
-#if PN_CPP_HAS_LAMBDAS
+#if PN_CPP_HAS_LAMBDAS && PN_CPP_HAS_VARIADIC_TEMPLATES
 void work_queue::schedule(duration d, v11::work f) {
     // If we have no actual work queue, then can't defer
     if (!impl_) return;


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

Reply via email to