Bug 264159 - Some members are missing in the std::views C++ STL namespace
Summary: Some members are missing in the std::views C++ STL namespace
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: standards (show other bugs)
Version: 13.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-standards (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-22 20:45 UTC by Yuri Victorovich
Modified: 2022-05-22 20:45 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2022-05-22 20:45:59 UTC
The example from https://en.cppreference.com/w/cpp/ranges/all_view fails to compile:


$ c++ -std=c++20 x.cpp 
x.cpp:9:50: error: no member named 'take' in namespace 'std::views'
    for(int n : std::views::all(v) | std::views::take(2) ) {
                                     ~~~~~~~~~~~~^
x.cpp:14:30: error: no member named 'single' in namespace 'std::views'
        decltype(std::views::single(42)),
                 ~~~~~~~~~~~~^
x.cpp:16:9: error: expected '(' for function-style cast or type construction
        >{});
        ^
x.cpp:16:9: error: initializer list cannot be used on the right hand side of operator '>'
        >{});
        ^~~
4 errors generated.