diff options
-rw-r--r-- | fsa/queryproc/permute_query.cpp | 6 | ||||
-rw-r--r-- | fsa/src/alltest/lookup_test.cpp | 6 | ||||
-rw-r--r-- | fsa/src/vespa/fsa/automaton.cpp | 4 | ||||
-rw-r--r-- | fsa/src/vespa/fsa/fsa.h | 177 | ||||
-rw-r--r-- | fsa/src/vespa/fsa/vectorizer.h | 4 | ||||
-rw-r--r-- | fsa/src/vespa/fsamanagers/fsamanager.cpp | 4 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/stllike/string.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/testkit/test_master.hpp | 2 |
8 files changed, 2 insertions, 203 deletions
diff --git a/fsa/queryproc/permute_query.cpp b/fsa/queryproc/permute_query.cpp index 0e305ef7b75..7586252210e 100644 --- a/fsa/queryproc/permute_query.cpp +++ b/fsa/queryproc/permute_query.cpp @@ -7,12 +7,6 @@ #include "ngram.h" #include "base64.h" -#if (__GNUG__ <3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) -namespace std { -const char *fixed = ""; -} -#endif - using namespace fsa; unsigned int gram_count(unsigned int mg, unsigned int q) diff --git a/fsa/src/alltest/lookup_test.cpp b/fsa/src/alltest/lookup_test.cpp index d9ae17658d1..19880d7a0a3 100644 --- a/fsa/src/alltest/lookup_test.cpp +++ b/fsa/src/alltest/lookup_test.cpp @@ -7,12 +7,6 @@ #include <vespa/fsa/fsa.h> -#if (__GNUG__ <3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) -namespace std { -const char *left = ""; -} -#endif - using namespace fsa; int main(int argc, char** argv) diff --git a/fsa/src/vespa/fsa/automaton.cpp b/fsa/src/vespa/fsa/automaton.cpp index 57bcfb180a8..75aead62ba5 100644 --- a/fsa/src/vespa/fsa/automaton.cpp +++ b/fsa/src/vespa/fsa/automaton.cpp @@ -638,11 +638,7 @@ void Automaton::cleanUp() _register.clear(); delete _q0; _q0 = NULL; -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) _previous_input.clear(); -#else - _previous_input = ""; -#endif } } diff --git a/fsa/src/vespa/fsa/fsa.h b/fsa/src/vespa/fsa/fsa.h index f3703b398ba..b6e5789e043 100644 --- a/fsa/src/vespa/fsa/fsa.h +++ b/fsa/src/vespa/fsa/fsa.h @@ -776,35 +776,8 @@ public: */ virtual ~HashedState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -923,35 +896,8 @@ public: */ virtual ~CounterState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1240,35 +1186,8 @@ public: */ virtual ~MemoryState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1280,11 +1199,7 @@ public: */ bool start() override { -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) _memory.clear(); -#else - _memory = ""; -#endif return State::start(); } @@ -1425,35 +1340,8 @@ public: */ virtual ~HashedMemoryState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1466,11 +1354,7 @@ public: bool start() override { _hash = 0; -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) _memory.clear(); -#else - _memory = ""; -#endif return State::start(); } @@ -1606,35 +1490,8 @@ public: */ virtual ~HashedCounterState() {} -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::start; using State::delta; -#else - virtual bool start(symbol_t in) { start(); return delta(in); } - virtual bool start(const symbol_t *in) { start(); return delta(in); } - virtual bool start(const char *in) { start(); return delta(in); } - virtual bool start(const std::string &in) { start(); return delta(in); } - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Set the state to the starting state of the automaton. @@ -1749,30 +1606,7 @@ public: uint32_t _counter; /**< Counter value. */ -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) using State::delta; -#else - virtual bool delta(const symbol_t *in) - { - const symbol_t *p=in; - while(*p && _state>0){ - delta(*p); - p++; - } - return _state!=0; - } - virtual bool delta(const char *in) { return delta((const symbol_t *)in); } - virtual bool delta(const std::string &in) - { - unsigned int idx=0; - - while(idx<in.length() && _state>0){ - delta(in[idx]); - idx++; - } - return _state!=0; - } -#endif /** * @brief Delta transition for hashed word counter states. @@ -1933,17 +1767,6 @@ public: // }}} -#if (__GNUG__ < 3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) - friend class State; - friend class HashedState; - friend class MemoryState; - friend class HashedMemoryState; - friend class CounterState; - friend class HashedCounterState; - friend class WordCounterState; - friend class HashedWordCounterState; -#endif - public: /** * @brief Magic number for identifying fsa files. diff --git a/fsa/src/vespa/fsa/vectorizer.h b/fsa/src/vespa/fsa/vectorizer.h index 6ce94e92569..7e61c4f6d88 100644 --- a/fsa/src/vespa/fsa/vectorizer.h +++ b/fsa/src/vespa/fsa/vectorizer.h @@ -448,10 +448,6 @@ private: // }}} -#if (__GNUG__<3 || (__GNUG__ == 3 && __GNUC_MINOR__ < 1)) - friend RawVector::iterator; -#endif - private: /** diff --git a/fsa/src/vespa/fsamanagers/fsamanager.cpp b/fsa/src/vespa/fsamanagers/fsamanager.cpp index c26e49adedd..037e0f53f79 100644 --- a/fsa/src/vespa/fsamanagers/fsamanager.cpp +++ b/fsa/src/vespa/fsamanagers/fsamanager.cpp @@ -42,11 +42,7 @@ bool FSAManager::load(const std::string &id, const std::string &url) { std::string file=url; -#if ((__GNUG__ == 3 && __GNUC_MINOR__ >= 1) || __GNUG__ > 3) if(!url.compare(0,7,"http://")) -#else - if(!url.compare("http://",0,7)) -#endif { unsigned int pos=url.find_last_of('/'); if(pos==url.size()-1) return false; diff --git a/vespalib/src/vespa/vespalib/stllike/string.h b/vespalib/src/vespa/vespalib/stllike/string.h index 7bf03895a88..73b91de883d 100644 --- a/vespalib/src/vespa/vespalib/stllike/string.h +++ b/vespalib/src/vespa/vespalib/stllike/string.h @@ -654,7 +654,7 @@ template<uint32_t StackSize> small_string<StackSize> operator + (const char * a, const small_string<StackSize> & b); -#if __cplusplus < 201709L || (!defined(__clang__) && defined(__GNUC__) && __GNUC__ < 10) +#if __cplusplus < 201709L template<typename T, uint32_t StackSize> bool operator == (const T& a, const small_string<StackSize>& b) noexcept diff --git a/vespalib/src/vespa/vespalib/testkit/test_master.hpp b/vespalib/src/vespa/vespalib/testkit/test_master.hpp index 7d9b2e1fddc..f2724731bee 100644 --- a/vespalib/src/vespa/vespalib/testkit/test_master.hpp +++ b/vespalib/src/vespa/vespalib/testkit/test_master.hpp @@ -4,7 +4,7 @@ namespace vespalib { -#if (!defined(__clang__) && defined(__GNUC__) && __GNUC__ < 9) || (defined(__clang__) && defined(__apple_build_version__)) +#if defined(__clang__) && defined(__apple_build_version__) // cf. https://cplusplus.github.io/LWG/issue2221 template<class charT, class traits> std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& os, std::nullptr_t) |