https://bugs.documentfoundation.org/show_bug.cgi?id=158237

--- Comment #42 from Buovjaga <[email protected]> ---
(In reply to fpy from comment #41)
> (In reply to Hossein from comment #0)
> > ... using contains()
> 
> seems gcc version 14.2.0 has a problem for cases like 
> l10ntools/source/localize.cxx:
> 
>     static constexpr std::string_view projects[] = {
>         "include",
>         "accessibility",
>        ...
>     };
>     return std::ranges::contains(std::begin(projects), std::end(projects),
> rProject);
> 
> 
> --> error: ‘contains’ is not a member of ‘std::ranges’

In this case you could look into using
https://en.cppreference.com/w/cpp/string/basic_string_view/contains.html which
is supported by our compiler baseline.

If we wanted to use ranges::contains, we would have to bump our baseline for
Clang, gcc and Xcode, but even then Xcode is still lacking full support:
https://en.cppreference.com/w/cpp/compiler_support.html#C.2B.2B23_library_features
https://en.cppreference.com/w/cpp/algorithm/ranges/contains

If hovering over the ** for Apple Clang in cppreference or clicking the Xcode
version number in this newer, WIP compiler support site:
https://cppstat.dev/?search=ranges::contains we can see the reason for the
yellow partial status indication: "std::ranges::contains_subrange is not
implemented".

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to