This version of Squid requires a C++11 compiler, so the conditional will always be true
/*
* Ensure that standard type limits are defined for use
*/
-#if __cplusplus >= 201103L
+#if __cplusplus
#include <cstdint>
#elif HAVE_STDINT_H
#include <stdint.h>
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;
}
{
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;
}
{
SBufList sl;
sl.push_back(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;
}
++action;
}
-#if __cplusplus >= 201103L
text.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;
reference (p);
}
-#if __cplusplus >= 201103L
RefCount (RefCount &&p) : p_(std::move(p.p_)) {
p.p_=NULL;
}
-#endif
RefCount& operator = (const RefCount& p) {
// DO NOT CHANGE THE ORDER HERE!!!
return *this;
}
-#if __cplusplus >= 201103L
RefCount& operator = (RefCount&& p) {
if (this != &p) {
dereference(p.p_);
}
return *this;
}
-#endif
explicit operator bool() const { return p_; }
* Current SBuf will share backing store with the assigned one.
*/
SBuf& operator =(const SBuf & S) {return assign(S);}
-#if __cplusplus >= 201103L
SBuf& operator =(SBuf &&S) {
++stats.moves;
if (this != &S) {
}
return *this;
}
-#endif
/** Import a c-string into a SBuf, copying the data.
*
}
}
-#if __cplusplus >= 201103L
void
testHttp1Parser::testParseRequestLineProtocols()
{
} while (Config.onoff.relaxed_header_parser);
}
-#endif /* __cplusplus >= 201103L */
CPPUNIT_TEST_SUITE( testHttp1Parser );
// object basics are working, just in case.
CPPUNIT_TEST( testParserConstruct );
-
-#if __cplusplus >= 201103L
CPPUNIT_TEST( testDripFeed );
CPPUNIT_TEST( testParseRequestLineMethods );
CPPUNIT_TEST( testParseRequestLineProtocols );
CPPUNIT_TEST( testParseRequestLineTerminators );
CPPUNIT_TEST( testParseRequestLineStrange );
CPPUNIT_TEST( testParseRequestLineInvalid );
-#endif
CPPUNIT_TEST_SUITE_END();
protected:
void testParserConstruct(); // whether the constructor works
-#if __cplusplus >= 201103L
// request-line unit tests
void testParseRequestLineTerminators(); // terminator detection correct
void testParseRequestLineMethods(); // methoid detection correct
void testParseRequestLineInvalid(); // rejection of invalid lines happens
void testDripFeed(); // test incremental parse works
-#endif
};
#endif