problem with std::regex not fulfilling standard?
for this code I got the below

    for (intmax_t i=0; i <
regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
std::regex(findstr, std::regex(regexPatterns[i],
std::regex_constants::extended |
(icase?std::regex_constants::icase:0)); i++);


In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:763:2: note: candidate:
template<class _FwdIter> std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2>
>::basic_regex(_FwdIter, _FwdIter, std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::locale_type,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type)
  basic_regex(_FwdIter __first, _FwdIter __last, locale_type __loc,
  ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:763:2: note:   template
argument deduction/substitution failed:
find.cpp:258:209: note:   deduced conflicting types for parameter
'_FwdIter' ('std::__cxx11::basic_string<char>' and 'unsigned int')
    for (intmax_t i=0; i <
regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
std::regex(findstr, std::regex(regexPatterns[i],
std::regex_constants::extended |
(icase?std::regex_constants::icase:0)); i++);
                                                                                
                                                                                
                                                 ^
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:523:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(std::initializer_list<_Tp>,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type) [with _Ch_type = char; _Rx_traits =
std::__cxx11::regex_traits<char>; std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::flag_type =
std::regex_constants::syntax_option_type]
       basic_regex(initializer_list<_Ch_type> __l, flag_type __f =
ECMAScript)
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:523:7: note:   no known
conversion for argument 1 from
'__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type {aka std::__cxx11::basic_string<char>}' to
'std::initializer_list<char>'
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:510:2: note: candidate:
template<class _FwdIter> std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2>
>::basic_regex(_FwdIter, _FwdIter, std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::flag_type)
  basic_regex(_FwdIter __first, _FwdIter __last,
  ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:510:2: note:   template
argument deduction/substitution failed:
find.cpp:258:209: note:   deduced conflicting types for parameter
'_FwdIter' ('std::__cxx11::basic_string<char>' and 'unsigned int')
    for (intmax_t i=0; i <
regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
std::regex(findstr, std::regex(regexPatterns[i],
std::regex_constants::extended |
(icase?std::regex_constants::icase:0)); i++);
                                                                                
                                                                                
                                                 ^
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:490:2: note: candidate:
template<class _Ch_traits, class _Ch_alloc> std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::basic_regex(const
std::__cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type)
  basic_regex(const std::basic_string<_Ch_type, _Ch_traits,
  ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:490:2: note:   template
argument deduction/substitution failed:
find.cpp:258:170: note:   cannot convert '(64u | (icase ? ((unsigned
int)((std::regex_constants::syntax_option_type)std::regex_constants::icase))
: 0u))' (type 'unsigned int') to type
'std::__cxx11::basic_regex<char>::flag_type {aka
std::regex_constants::syntax_option_type}'
    for (intmax_t i=0; i <
regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
std::regex(findstr, std::regex(regexPatterns[i],
std::regex_constants::extended |
(icase?std::regex_constants::icase:0)); i++);
                                                                                
                                                           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:477:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >&&) [with _Ch_type =
char; _Rx_traits = std::__cxx11::regex_traits<char>]
       basic_regex(basic_regex&& __rhs) noexcept = default;
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:477:7: note:   candidate
expects 1 argument, 2 provided
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:470:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(const std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >&) [with _Ch_type =
char; _Rx_traits = std::__cxx11::regex_traits<char>]
       basic_regex(const basic_regex& __rhs) = default;
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:470:7: note:   candidate
expects 1 argument, 2 provided
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:460:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(const _Ch_type*, std::size_t,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type) [with _Ch_type = char; _Rx_traits =
std::__cxx11::regex_traits<char>; std::size_t = unsigned int;
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type =
std::regex_constants::syntax_option_type]
       basic_regex(const _Ch_type* __p, std::size_t __len,
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:460:7: note:   no known
conversion for argument 1 from
'__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type {aka std::__cxx11::basic_string<char>}' to 'const char*'
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:444:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(const _Ch_type*,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type) [with _Ch_type = char; _Rx_traits =
std::__cxx11::regex_traits<char>; std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::flag_type =
std::regex_constants::syntax_option_type]
       basic_regex(const _Ch_type* __p, flag_type __f = ECMAScript)
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:444:7: note:   no known
conversion for argument 1 from
'__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type {aka std::__cxx11::basic_string<char>}' to 'const char*'
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:428:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex() [with _Ch_type = char;
_Rx_traits = std::__cxx11::regex_traits<char>]
       basic_regex()
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:428:7: note:   candidate
expects 0 arguments, 2 provided
find.cpp:258:210: error: expected ')' before ';' token
    for (intmax_t i=0; i <
regexPatterns.size()&&(findit=findIt||!std::regex_match(sline,
std::regex(findstr, std::regex(regexPatterns[i],
std::regex_constants::extended |
(icase?std::regex_constants::icase:0)); i++);
                                                                                
                                                                                
                                                  ^
find.cpp:285:53: error: 'findstr' was not declared in this scope
     if (!icase && std::regex_match(line, std::regex(findstr,
std::regex(regexPatterns[i], std::regex_constants::extended |
(icase?std::regex_constants::icase:0) )))) {
                                                     ^~~~~~~
find.cpp:285:162: error: no matching function for call to
'std::__cxx11::basic_regex<char>::basic_regex(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type&, unsigned int)'
     if (!icase && std::regex_match(line, std::regex(findstr,
std::regex(regexPatterns[i], std::regex_constants::extended |
(icase?std::regex_constants::icase:0) )))) {
                                                                                
                                                                                
  ^
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:763:2: note: candidate:
template<class _FwdIter> std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2>
>::basic_regex(_FwdIter, _FwdIter, std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::locale_type,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type)
  basic_regex(_FwdIter __first, _FwdIter __last, locale_type __loc,
  ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:763:2: note:   template
argument deduction/substitution failed:
find.cpp:285:162: note:   deduced conflicting types for parameter
'_FwdIter' ('std::__cxx11::basic_string<char>' and 'unsigned int')
     if (!icase && std::regex_match(line, std::regex(findstr,
std::regex(regexPatterns[i], std::regex_constants::extended |
(icase?std::regex_constants::icase:0) )))) {
                                                                                
                                                                                
  ^
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:523:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(std::initializer_list<_Tp>,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type) [with _Ch_type = char; _Rx_traits =
std::__cxx11::regex_traits<char>; std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::flag_type =
std::regex_constants::syntax_option_type]
       basic_regex(initializer_list<_Ch_type> __l, flag_type __f =
ECMAScript)
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:523:7: note:   no known
conversion for argument 1 from
'__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type {aka std::__cxx11::basic_string<char>}' to
'std::initializer_list<char>'
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:510:2: note: candidate:
template<class _FwdIter> std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2>
>::basic_regex(_FwdIter, _FwdIter, std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::flag_type)
  basic_regex(_FwdIter __first, _FwdIter __last,
  ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:510:2: note:   template
argument deduction/substitution failed:
find.cpp:285:162: note:   deduced conflicting types for parameter
'_FwdIter' ('std::__cxx11::basic_string<char>' and 'unsigned int')
     if (!icase && std::regex_match(line, std::regex(findstr,
std::regex(regexPatterns[i], std::regex_constants::extended |
(icase?std::regex_constants::icase:0) )))) {
                                                                                
                                                                                
  ^
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:490:2: note: candidate:
template<class _Ch_traits, class _Ch_alloc> std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::basic_regex(const
std::__cxx11::basic_string<_Ch_type, _Ch_traits, _Ch_alloc>&,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type)
  basic_regex(const std::basic_string<_Ch_type, _Ch_traits,
  ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:490:2: note:   template
argument deduction/substitution failed:
find.cpp:285:122: note:   cannot convert '(64u | (icase ? ((unsigned
int)((std::regex_constants::syntax_option_type)std::regex_constants::icase))
: 0u))' (type 'unsigned int') to type
'std::__cxx11::basic_regex<char>::flag_type {aka
std::regex_constants::syntax_option_type}'
     if (!icase && std::regex_match(line, std::regex(findstr,
std::regex(regexPatterns[i], std::regex_constants::extended |
(icase?std::regex_constants::icase:0) )))) {
                                                                                
           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\gcc-7-win32\include\c++\7.0.0\regex:62:0,
                 from find.cpp:31:
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:477:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >&&) [with _Ch_type =
char; _Rx_traits = std::__cxx11::regex_traits<char>]
       basic_regex(basic_regex&& __rhs) noexcept = default;
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:477:7: note:   candidate
expects 1 argument, 2 provided
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:470:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(const std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >&) [with _Ch_type =
char; _Rx_traits = std::__cxx11::regex_traits<char>]
       basic_regex(const basic_regex& __rhs) = default;
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:470:7: note:   candidate
expects 1 argument, 2 provided
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:460:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(const _Ch_type*, std::size_t,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type) [with _Ch_type = char; _Rx_traits =
std::__cxx11::regex_traits<char>; std::size_t = unsigned int;
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type =
std::regex_constants::syntax_option_type]
       basic_regex(const _Ch_type* __p, std::size_t __len,
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:460:7: note:   no known
conversion for argument 1 from
'__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type {aka std::__cxx11::basic_string<char>}' to 'const char*'
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:444:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex(const _Ch_type*,
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::flag_type) [with _Ch_type = char; _Rx_traits =
std::__cxx11::regex_traits<char>; std::__cxx11::basic_regex<
<template-parameter-1-1>, <template-parameter-1-2> >::flag_type =
std::regex_constants::syntax_option_type]
       basic_regex(const _Ch_type* __p, flag_type __f = ECMAScript)
       ^~~~~~~~~~~
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:444:7: note:   no known
conversion for argument 1 from
'__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char>
> >::value_type {aka std::__cxx11::basic_string<char>}' to 'const char*'
c:\gcc-7-win32\include\c++\7.0.0\bits\regex.h:428:7: note: candidate:
std::__cxx11::basic_regex< <template-parameter-1-1>,
<template-parameter-1-2> >::basic_regex() [with _Ch_type = char;
_Rx_traits = std::__cxx11::regex_traits<char>]
       basic_regex()
       ^~~~~~~~~~~

-- 
Jim Michaels
[email protected]


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to