+2018-10-12 Jonathan Wakely <jwakely@redhat.com>
+
+ Backport from mainline
+ 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/85098
+ * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
+ (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
+ (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
+ (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
+ definitions.
+ * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
+ whitespace.
+ * testsuite/28_regex/basic_regex/85098.cc: New
+
2018-10-08 Joseph Myers <joseph@codesourcery.com>
Backport from mainline
_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;
+
/** @brief Standard regular expressions. */
typedef basic_regex<char> regex;
--- /dev/null
+// Copyright (C) 2018 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 3, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+// { dg-options "-O0" }
+// { dg-do link { target c++11 } }
+
+#include <regex>
+
+void f(const std::regex_constants::syntax_option_type&) { }
+
+void
+test01()
+{
+ f(std::regex::icase);
+ f(std::regex::nosubs);
+ f(std::regex::optimize);
+ f(std::regex::collate);
+ f(std::regex::ECMAScript);
+ f(std::regex::basic);
+ f(std::regex::extended);
+ f(std::regex::awk);
+ f(std::regex::grep);
+ f(std::regex::egrep);
+ // f(std::regex::multiline);
+}
+
+int
+main()
+{
+ test01();
+}