Bug 264159

Summary: Some members are missing in the std::views C++ STL namespace
Product: Base System Reporter: Yuri Victorovich <yuri>
Component: standardsAssignee: freebsd-standards (Nobody) <standards>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: 13.1-STABLE   
Hardware: Any   
OS: Any   

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.