qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [05/10] qpid-proton git commit: PROTON-1317: c++ SunStudio: Add template parameter
Date Thu, 20 Oct 2016 12:26:33 GMT
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 <adel.boutros@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/master
Commit: 1a20faa3910ecef380b47f560047eec576362ffa
Parents: dae0c55
Author: aboutros <adel.boutros@murex.com>
Authored: Wed Oct 5 11:51:54 2016 +0200
Committer: Alan Conway <aconway@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


Mime
View raw message