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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Peter VARGA from comment #0)
>   using smatch = std::match_results<FaF::string::const_iterator,
> Allocator<FaF::string::const_iterator>>;

The value type of match_result<Iter> is sub_match<Iter>, so you need to use
Allocator<sub_match<Iter>> not Allocator<Iter>.

> Changing it to std::smatch then it compiles.

Because that uses the correct allocator type.

> Compiler options:
> -O3 -std=c++17 -Werror -Wextra -Wold-style-cast -Wall

If you use -std=gnu++17 then your code will be accepted, but is not portable
and is not valid C++.

Reply via email to