]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/85098 add missing definitions for static constants
authorJonathan Wakely <jwakely@redhat.com>
Fri, 12 Oct 2018 11:37:46 +0000 (12:37 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 12 Oct 2018 11:37:46 +0000 (12:37 +0100)
commit2d75d90a3d8b2ed3952769ba4d37f8782ef5ff02
tree994b1d5c126c4d30080b722e245457dd832d376b
parent9f8c787dcc56877afc42199e50d16596b214a6b1
PR libstdc++/85098 add missing definitions for static constants

In C++11 and C++14 any odr-use of these constants requires a definition
at namespace-scope.  In C++17 they are implicitly inline and so the
namespace-scope redeclarations are redundant (and allowing them is
deprecated).

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

From-SVN: r265083
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex.h
libstdc++-v3/include/bits/regex_automaton.h
libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc [new file with mode: 0644]