PR libstdc++/85098 add missing definitions for static constants
authorJonathan Wakely <jwakely@redhat.com>
Fri, 18 May 2018 16:14:04 +0000 (17:14 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 18 May 2018 16:14:04 +0000 (17:14 +0100)
commit2d76fab440c585b09703cf268b2a306b026569dd
treee1c608aac6f8dc8cacfc096e24d716f96512af87
parent950ad0bafece295e34e5d3912da0d0314cd0dad1
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).

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.
* include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
braces around body of do-while.
* testsuite/28_regex/basic_regex/85098.cc: New

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