[Bug libstdc++/94241] ranges::find_if doesn't like data structures defined in a function

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 20 17:52:02 GMT 2020


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#include <algorithm>

int main()
{
    struct s { int m; };
    s r[] = { s{0}, s{1}, s{2}, s{3} };
    std::ranges::find_if(r, [](auto const) { return true; });
}


More information about the Gcc-bugs mailing list