public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/64680] New: basic_regex::operator= does not reset flags
@ 2015-01-20 2:53 kariya_mitsuru at hotmail dot com
2015-01-22 5:07 ` [Bug libstdc++/64680] " timshen at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: kariya_mitsuru at hotmail dot com @ 2015-01-20 2:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64680
Bug ID: 64680
Summary: basic_regex::operator= does not reset flags
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kariya_mitsuru at hotmail dot com
Created attachment 34491
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34491&action=edit
g++ -v
The sample code below should not throw a regex_error.
========================= sample code =========================
#include <regex>
int main()
{
std::regex re("[[:alnum:]]", std::regex_constants::basic);
re = "\\w+";
}
===============================================================
cf. http://melpon.org/wandbox/permlink/lrD2Ia4urIPVgakK
According to the C++11 standard 28.8.3[re.regex.assign], operator=(const charT*
ptr) is equivalent to assign(ptr), and assign(ptr) calls assign(const char*
ptr, flag_type f = regex_constants::ECMAScript).
Since "\\w+" is a valid ECMAScript syntax, the sample code above should end
normally.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/64680] basic_regex::operator= does not reset flags
2015-01-20 2:53 [Bug libstdc++/64680] New: basic_regex::operator= does not reset flags kariya_mitsuru at hotmail dot com
@ 2015-01-22 5:07 ` timshen at gcc dot gnu.org
2015-02-03 9:02 ` timshen at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: timshen at gcc dot gnu.org @ 2015-01-22 5:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64680
--- Comment #1 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Thu Jan 22 05:07:03 2015
New Revision: 219987
URL: https://gcc.gnu.org/viewcvs?rev=219987&root=gcc&view=rev
Log:
PR libstdc++/64680
* include/bits/regex.h (basic_regex<>::basic_regex,
basic_regex<>::operator=, basic_regex<>::imbue): Conform to the
standard interface.
* testsuite/28_regex/basic_regex/assign/char/cstring.cc: New testcase.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/regex.h
trunk/libstdc++-v3/testsuite/28_regex/basic_regex/assign/char/cstring.cc
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/64680] basic_regex::operator= does not reset flags
2015-01-20 2:53 [Bug libstdc++/64680] New: basic_regex::operator= does not reset flags kariya_mitsuru at hotmail dot com
2015-01-22 5:07 ` [Bug libstdc++/64680] " timshen at gcc dot gnu.org
@ 2015-02-03 9:02 ` timshen at gcc dot gnu.org
2015-03-09 6:52 ` timshen at gcc dot gnu.org
2023-07-20 11:45 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: timshen at gcc dot gnu.org @ 2015-02-03 9:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64680
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Tue Feb 3 09:01:36 2015
New Revision: 220366
URL: https://gcc.gnu.org/viewcvs?rev=220366&root=gcc&view=rev
Log:
PR libstdc++/64680
Backported from mainline
2015-01-22 Tim Shen <timshen@google.com>
* include/bits/regex.h (basic_regex<>::basic_regex,
basic_regex<>::operator=, basic_regex<>::imbue): Conform to the
standard interface.
* testsuite/28_regex/basic_regex/assign/char/cstring.cc: New testcase.
Modified:
branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex.h
branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/basic_regex/assign/char/cstring.cc
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/64680] basic_regex::operator= does not reset flags
2015-01-20 2:53 [Bug libstdc++/64680] New: basic_regex::operator= does not reset flags kariya_mitsuru at hotmail dot com
2015-01-22 5:07 ` [Bug libstdc++/64680] " timshen at gcc dot gnu.org
2015-02-03 9:02 ` timshen at gcc dot gnu.org
@ 2015-03-09 6:52 ` timshen at gcc dot gnu.org
2023-07-20 11:45 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: timshen at gcc dot gnu.org @ 2015-03-09 6:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64680
Tim Shen <timshen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |timshen at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #3 from Tim Shen <timshen at gcc dot gnu.org> ---
Resolved.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/64680] basic_regex::operator= does not reset flags
2015-01-20 2:53 [Bug libstdc++/64680] New: basic_regex::operator= does not reset flags kariya_mitsuru at hotmail dot com
` (2 preceding siblings ...)
2015-03-09 6:52 ` timshen at gcc dot gnu.org
@ 2023-07-20 11:45 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-20 11:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64680
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-20 11:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-20 2:53 [Bug libstdc++/64680] New: basic_regex::operator= does not reset flags kariya_mitsuru at hotmail dot com
2015-01-22 5:07 ` [Bug libstdc++/64680] " timshen at gcc dot gnu.org
2015-02-03 9:02 ` timshen at gcc dot gnu.org
2015-03-09 6:52 ` timshen at gcc dot gnu.org
2023-07-20 11:45 ` redi at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).