https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85098
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- Author: redi Date: Fri May 18 16:14:04 2018 New Revision: 260371 URL: https://gcc.gnu.org/viewcvs?rev=260371&root=gcc&view=rev Log: 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 Added: trunk/libstdc++-v3/testsuite/28_regex/basic_regex/85098.cc Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/include/bits/regex.h trunk/libstdc++-v3/include/bits/regex_automaton.h trunk/libstdc++-v3/include/bits/regex_compiler.tcc