From a7a3046130ea56bf17089de3a55da4f5efd26596 Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Wed, 2 Apr 2014 21:23:40 +0000 Subject: QPID-5658: Small changes to compile with clang's libc++ git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1584198 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/RangeSet.h | 2 ++ qpid/cpp/src/qpid/broker/MessageBuilder.h | 2 ++ qpid/cpp/src/qpid/broker/SelectorToken.cpp | 3 ++- qpid/cpp/src/qpid/sys/unordered_map.h | 6 +++++- 4 files changed, 11 insertions(+), 2 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/RangeSet.h b/qpid/cpp/src/qpid/RangeSet.h index ef0ad032da..78677f1263 100644 --- a/qpid/cpp/src/qpid/RangeSet.h +++ b/qpid/cpp/src/qpid/RangeSet.h @@ -26,7 +26,9 @@ #include #include #include + #include +#include #include namespace qpid { diff --git a/qpid/cpp/src/qpid/broker/MessageBuilder.h b/qpid/cpp/src/qpid/broker/MessageBuilder.h index 5ca6fa0c66..5673ed3b7f 100644 --- a/qpid/cpp/src/qpid/broker/MessageBuilder.h +++ b/qpid/cpp/src/qpid/broker/MessageBuilder.h @@ -26,6 +26,8 @@ #include "qpid/framing/SequenceNumber.h" #include "qpid/RefCounted.h" +#include + #include namespace qpid { diff --git a/qpid/cpp/src/qpid/broker/SelectorToken.cpp b/qpid/cpp/src/qpid/broker/SelectorToken.cpp index e745bc3889..309c0891df 100644 --- a/qpid/cpp/src/qpid/broker/SelectorToken.cpp +++ b/qpid/cpp/src/qpid/broker/SelectorToken.cpp @@ -147,6 +147,7 @@ inline bool isIdentifierPart(char c) return std::isalnum(c) || c=='_' || c=='$' || c=='.'; } +static const std::string END(""); bool tokenise(std::string::const_iterator& s, std::string::const_iterator& e, Token& tok) { std::string::const_iterator t = s; @@ -171,7 +172,7 @@ bool tokenise(std::string::const_iterator& s, std::string::const_iterator& e, To while (true) switch (state) { case START: - if (t==e) {tok = Token(T_EOS, s, ""); return true;} + if (t==e) {tok = Token(T_EOS, s, END); return true;} else switch (*t) { case '(': tokType = T_LPAREN; state = ACCEPT_INC; continue; case ')': tokType = T_RPAREN; state = ACCEPT_INC; continue; diff --git a/qpid/cpp/src/qpid/sys/unordered_map.h b/qpid/cpp/src/qpid/sys/unordered_map.h index 7ae71c3daa..22cedad299 100644 --- a/qpid/cpp/src/qpid/sys/unordered_map.h +++ b/qpid/cpp/src/qpid/sys/unordered_map.h @@ -21,7 +21,7 @@ // unordered_map include path is platform specific -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(_LIBCPP_VERSION) || __cplusplus >= 201103L # include #elif defined(__SUNPRO_CC) # include @@ -30,7 +30,11 @@ #endif /* _MSC_VER */ namespace qpid { namespace sys { +#if defined(_LIBCPP_VERSION) || __cplusplus >= 201103L + using std::unordered_map; +#else using std::tr1::unordered_map; +#endif }} -- cgit v1.2.1