@@ -54,30 +54,6 @@ DEALINGS IN THE SOFTWARE.
5454# include < boost/variant.hpp>
5555#endif
5656
57-
58- // std::regex isn't implemented properly in glibc++ (before the version
59- // delivered with GCC 4.9) and libc++ before the version 3.6, so the use is
60- // disabled by these checks. Checks for GLIBC were based on
61- // https://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions
62- // Checks for libc++ are simply based on compiler defines. This is probably
63- // not optimal but seems to work for now.
64- #if defined(__GLIBCXX__)
65- # if ((__cplusplus >= 201402L) || \
66- defined (_GLIBCXX_REGEX_DFS_QUANTIFIERS_LIMIT) || \
67- defined(_GLIBCXX_REGEX_STATE_LIMIT))
68- # define OSMIUM_WITH_REGEX
69- # else
70- # pragma message("Disabling regex functionality. See source code for info.")
71- # endif
72- #elif defined(__clang__)
73- # if ((__clang_major__ > 3) || \
74- (__clang_minor__ == 3 && __clang_minor__ > 5 ))
75- # define OSMIUM_WITH_REGEX
76- # else
77- # pragma message("Disabling regex functionality")
78- # endif
79- #endif
80-
8157namespace osmium {
8258
8359 /* *
@@ -211,7 +187,6 @@ namespace osmium {
211187
212188 }; // class substring
213189
214- #ifdef OSMIUM_WITH_REGEX
215190 /* *
216191 * Matches if the test string matches the regular expression.
217192 */
@@ -235,7 +210,6 @@ namespace osmium {
235210 }
236211
237212 }; // class regex
238- #endif
239213
240214 /* *
241215 * Matches if the test string is equal to any of the stored strings.
@@ -293,9 +267,7 @@ namespace osmium {
293267 equal,
294268 prefix,
295269 substring,
296- #ifdef OSMIUM_WITH_REGEX
297270 regex,
298- #endif
299271 list>;
300272
301273 matcher_type m_matcher;
@@ -388,7 +360,6 @@ namespace osmium {
388360 m_matcher (equal{str}) {
389361 }
390362
391- #ifdef OSMIUM_WITH_REGEX
392363 /* *
393364 * Create a string matcher that will match the specified regex.
394365 * Shortcut for
@@ -398,7 +369,6 @@ namespace osmium {
398369 StringMatcher (const std::regex& aregex) : // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
399370 m_matcher (regex{aregex}) {
400371 }
401- #endif
402372
403373 /* *
404374 * Create a string matcher that will match if any of the strings
0 commit comments