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++/64649] New: regex_traits::lookup_classname() only works with random access iterators


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

            Bug ID: 64649
           Summary: regex_traits::lookup_classname() only works with
                    random access iterators
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org

#include <regex>
#include <forward_list>

int main()
{
  std::forward_list<char> f{ 'A' };
  std::regex_traits<char>{}.lookup_collatename(f.begin(), f.end());
}

This function should work with ForwardIterators, but it fails because of line
300 in bits/regex.tcc

      std::string __s(__last - __first, '?');


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