Repository: qpid-proton Updated Branches: refs/heads/master d280f8fad -> a1f0dd167
PROTON-1324: c++ correct implementation of proton::is_signed<char> This uses std::numeric_limits<char> to get the platform setting, which works on C++03 and should be portable. Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a1f0dd16 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a1f0dd16 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a1f0dd16 Branch: refs/heads/master Commit: a1f0dd167563bd9643c7d06419da11244d119752 Parents: d280f8f Author: Alan Conway <acon...@redhat.com> Authored: Thu Oct 20 11:52:05 2016 -0400 Committer: Alan Conway <acon...@redhat.com> Committed: Thu Oct 20 11:52:05 2016 -0400 ---------------------------------------------------------------------- proton-c/bindings/cpp/include/proton/internal/type_traits.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a1f0dd16/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 ee49a15..3d66f94 100644 --- a/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp +++ b/proton-c/bindings/cpp/include/proton/internal/type_traits.hpp @@ -30,6 +30,7 @@ #include "./config.hpp" #include "../types_fwd.hpp" #include "../type_id.hpp" +#include <limits> namespace proton { namespace internal { @@ -47,7 +48,7 @@ template <class T> struct is_integral : public false_type {}; template <class T> struct is_signed : public false_type {}; template <> struct is_integral<char> : public true_type {}; -template <> struct is_signed<char> : public false_type {}; +template <> struct is_signed<char> { static const bool value = std::numeric_limits<char>::is_signed; }; template <> struct is_integral<unsigned char> : public true_type {}; template <> struct is_integral<unsigned short> : public true_type {}; --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org