]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR libstdc++/85098 add missing definitions for static constants
authorJonathan Wakely <jwakely@redhat.com>
Wed, 4 Jul 2018 13:59:13 +0000 (14:59 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 4 Jul 2018 13:59:13 +0000 (14:59 +0100)
commite9dae68f9f7be47198ee8edbfc702df9167bc48f
treed8e29d735bf2a2a64fe67e2dd1177994488e2223
parentc8fbe558101c52bf3ece5d71634c5380da73c310
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: r262405
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]