PR libstdc++/85098 add missing definitions for static constants
commit16828ff7fc71f1ace03885c22b4a9af3628d9c1a
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 May 2018 16:14:04 +0000 (18 16:14 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 May 2018 16:14:04 +0000 (18 16:14 +0000)
treee1c608aac6f8dc8cacfc096e24d716f96512af87
parent68bf47121b75cc0c496c9ba931cdbe280eb3dcb4
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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260371 138bc75d-0d04-0410-961f-82ee72b054a4
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]