[Bug libstdc++/85098] undefined reference to std::regex::extended
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 28 12:58:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85098
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Untested fix:
--- a/libstdc++-v3/include/bits/regex.h
+++ b/libstdc++-v3/include/bits/regex.h
@@ -776,6 +776,37 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
_AutomatonPtr _M_automaton;
};
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::icase;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::nosubs;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::optimize;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::collate;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::ECMAScript;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::basic;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::extended;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::awk;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::grep;
+ template<typename _Ch, typename _Tr>
+ constexpr regex_constants::syntax_option_type
+ basic_regex<_Ch, _Tr>::egrep;
+
#if __cpp_deduction_guides >= 201606
template<typename _ForwardIterator>
basic_regex(_ForwardIterator, _ForwardIterator,
More information about the Gcc-bugs
mailing list