summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2014-04-02 21:23:40 +0000
committerAndrew Stitcher <astitcher@apache.org>2014-04-02 21:23:40 +0000
commita7a3046130ea56bf17089de3a55da4f5efd26596 (patch)
tree95f22b4026105c2a34b95e91b8afdb0086c7fddb
parentd7e4d9b3dce615ae5fe628e05746964fc67a3e58 (diff)
downloadqpid-python-a7a3046130ea56bf17089de3a55da4f5efd26596.tar.gz
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
-rw-r--r--qpid/cpp/src/qpid/RangeSet.h2
-rw-r--r--qpid/cpp/src/qpid/broker/MessageBuilder.h2
-rw-r--r--qpid/cpp/src/qpid/broker/SelectorToken.cpp3
-rw-r--r--qpid/cpp/src/qpid/sys/unordered_map.h6
4 files changed, 11 insertions, 2 deletions
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 <boost/iterator/iterator_facade.hpp>
#include <boost/operators.hpp>
#include <boost/bind.hpp>
+
#include <algorithm>
+#include <iostream>
#include <numeric>
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 <string>
+
#include <boost/intrusive_ptr.hpp>
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("<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, "<END>"); 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 <unordered_map>
#elif defined(__SUNPRO_CC)
# include <boost/tr1/unordered_map.hpp>
@@ -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
}}