You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2016/11/02 02:53:56 UTC

[36/50] [abbrv] qpid-proton git commit: PROTON-1318: c++ SunStudio: Replace variadic constructor

PROTON-1318: c++ SunStudio: Replace variadic constructor

Variadic constructor of "sfinae::wildcard" not supported on SunStudio.

Signed-off-by: aboutros <ad...@murex.com>


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

Branch: refs/heads/go1
Commit: 795278665fc90b96ec1091e878972b9112f91569
Parents: 1a20faa
Author: aboutros <ad...@murex.com>
Authored: Fri Oct 7 12:11:58 2016 +0200
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Oct 20 08:13:52 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/include/proton/codec/encoder.hpp       | 8 ++++----
 .../bindings/cpp/include/proton/internal/type_traits.hpp     | 4 +++-
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/79527866/proton-c/bindings/cpp/include/proton/codec/encoder.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/codec/encoder.hpp b/proton-c/bindings/cpp/include/proton/codec/encoder.hpp
index b1aff89..9183c07 100644
--- a/proton-c/bindings/cpp/include/proton/codec/encoder.hpp
+++ b/proton-c/bindings/cpp/include/proton/codec/encoder.hpp
@@ -170,15 +170,15 @@ operator<<(encoder& e, T i)  {
 }
 
 /// @cond INTERNAL
-    
-namespace is_encodable_impl {   // Protected the world from wildcard operator<<
+
+namespace is_encodable_impl {   // Protect the world from fallback operator<<
 
 using namespace internal;
 
-sfinae::no operator<<(sfinae::wildcard, sfinae::wildcard); // Fallback
+sfinae::no operator<<(encoder const&, const sfinae::any_t &); // Fallback
 
 template<typename T> struct is_encodable : public sfinae {
-    static yes test(encoder);
+    static yes test(encoder&);
     static no test(...);         // Failed test, no match.
     static encoder* e;
     static const T* t;

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/79527866/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp b/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp
index 3119804..ee49a15 100644
--- a/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp
+++ b/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp
@@ -152,7 +152,9 @@ struct known_integer : public integer_type<sizeof(T), is_signed<T>::value> {};
 struct sfinae {
     typedef char yes;
     typedef double no;
-    struct wildcard { wildcard(...); };
+    struct any_t {
+        template < typename T > any_t(T const&);
+    };
 };
 
 template <class From, class To> struct is_convertible : public sfinae {


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