]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Older Clang versions do not seem to offer full C++11 std::splice API
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 25 Jan 2015 04:53:40 +0000 (20:53 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 25 Jan 2015 04:53:40 +0000 (20:53 -0800)
src/acl/CertificateData.cc
src/acl/HttpHeaderData.cc
src/acl/NoteData.cc
src/acl/Tree.cc

index 050bdafa125c3364744bb73ad7043b050145d7d1..f85fe64c97494e93eb3f7cd63fd0e3ddef3cc5f1 100644 (file)
@@ -78,7 +78,13 @@ ACLCertificateData::dump() const
     if (validAttributesStr)
         sl.push_back(SBuf(attribute));
 
+#if __cplusplus >= 201103L
     sl.splice(sl.end(),values.dump());
+#else
+    // temp is needed until c++11 move constructor
+    SBufList tmp = values.dump();
+    sl.splice(sl.end(),tmp);
+#endif
     return sl;
 }
 
index 5e57a8d781e0be55425701c0c1bf2b567983f5d0..9617078b844f300bda36a181ff92e2b07df92126 100644 (file)
@@ -60,9 +60,13 @@ ACLHTTPHeaderData::dump() const
 {
     SBufList sl;
     sl.push_back(SBuf(hdrName));
+#if __cplusplus >= 201103L
+    sl.splice(sl.end(), regex_rule->dump());
+#else
     // temp is needed until c++11 move-constructor
     SBufList temp = regex_rule->dump();
     sl.splice(sl.end(), temp);
+#endif
     return sl;
 }
 
index 135ac16cf84d9df5a138ce5164c29c8b8e398c8b..c54e6e0440c326e33e3332fbd4eb6400edb58635 100644 (file)
@@ -64,9 +64,13 @@ ACLNoteData::dump() const
 {
     SBufList sl;
     sl.push_back(SBuf(name));
+#if __cplusplus >= 201103L
+    sl.splice(sl.end(), values->dump());
+#else
     // temp is needed until c++11 move constructor
     SBufList temp = values->dump();
     sl.splice(sl.end(), temp);
+#endif
     return sl;
 }
 
index 3aaf6f560bf6fb6b3f69a6fd915c1f376bf1cb2c..5aff46fb125d6d8694a78d8fd617a3077bc2f15e 100644 (file)
@@ -73,9 +73,13 @@ Acl::Tree::treeDump(const char *prefix, const ActionToString &convert) const
             ++action;
         }
 
+#if __cplusplus >= 201103L
+        sl.splice(text.end(), (*node)->dump());
+#else
         // temp is needed until c++11 move constructor
         SBufList temp = (*node)->dump();
         text.splice(text.end(), temp);
+#endif
         text.push_back(SBuf("\n"));
     }
     return text;