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

            Bug ID: 83511
           Summary: Missing default argument for basic_string_view::substr
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kaballo86 at hotmail dot com
  Target Milestone: ---

The following snippet results in a compilation error:

    std::string_view sv;
    sv = sv.substr();

> error: no matching function for call to 
> 'std::basic_string_view<char>::substr()'
>  note: candidate 'substr(size_type __pos, size_type __n = npos) const 
> noexcept(false)'

The declaration is missing a default argument of `0` for the first parameter.

Reply via email to