This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/67403] New: std::regex is not matching


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67403

            Bug ID: 67403
           Summary: std::regex is not matching
           Product: gcc
           Version: 4.8.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kirbyfan64sos at gmail dot com
  Target Milestone: ---

Reproducing it is simple:

#include <iostream>
#include <string>
#include <regex>

using namespace std;

int main() {
    cout << regex_search(string{"int"}, regex{"int"}) << '\n';
    return 0;
}

This *should* print 1, and with libc++ it does. GCC? It prints 0. This had me
practically tearing my hair out trying to figure out what was wrong with my
regexes! :/

I searched for existing bugs related to this, but couldn't find any. I'm sorry
if this is a duplicate...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]