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:55 UTC

[35/50] [abbrv] qpid-proton git commit: PROTON-1317: c++ SunStudio: Add template parameter

PROTON-1317: c++ SunStudio: Add template parameter

SunStudio 12.1 doesn't handle templated method signature detection when using an
"extern c" parameter

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/1a20faa3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/1a20faa3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/1a20faa3

Branch: refs/heads/go1
Commit: 1a20faa3910ecef380b47f560047eec576362ffa
Parents: dae0c55
Author: aboutros <ad...@murex.com>
Authored: Wed Oct 5 11:51:54 2016 +0200
Committer: Alan Conway <ac...@redhat.com>
Committed: Thu Oct 20 08:13:52 2016 -0400

----------------------------------------------------------------------
 proton-c/bindings/cpp/src/message.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/1a20faa3/proton-c/bindings/cpp/src/message.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/message.cpp b/proton-c/bindings/cpp/src/message.cpp
index 8524782..9a9634c 100644
--- a/proton-c/bindings/cpp/src/message.cpp
+++ b/proton-c/bindings/cpp/src/message.cpp
@@ -215,7 +215,7 @@ value& message::body() { pn_msg(); return body_; }
 // empty, the non-empty one is the authority.
 
 // Decode a map on demand
-template<class M> M& get_map(pn_message_t* msg, pn_data_t* (*get)(pn_message_t*), M& map) {
+template<class M, class F> M& get_map(pn_message_t* msg, F get, M& map) {
     codec::decoder d(make_wrapper(get(msg)));
     if (map.empty() && !d.empty()) {
         d.rewind();
@@ -226,7 +226,7 @@ template<class M> M& get_map(pn_message_t* msg, pn_data_t* (*get)(pn_message_t*)
 }
 
 // Encode a map if necessary.
-template<class M> M& put_map(pn_message_t* msg, pn_data_t* (*get)(pn_message_t*), M& map) {
+template<class M, class F> M& put_map(pn_message_t* msg, F get, M& map) {
     codec::encoder e(make_wrapper(get(msg)));
     if (e.empty() && !map.empty()) {
         e << map;


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