Author
anonymous
about 5 years ago
Language
C++
Compiler
gcc HEAD 11.0.0 20201129 (experimental)
Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic
Author
anonymous
about 5 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-head/include -std=gnu++2a prog.cc: In function 'int main()':
prog.cc:14:23: error: passing 'const std::ranges::filter_view<std::ranges::iota_view<int, std::unreachable_sentinel_t>, main()::<lambda(int)> >' as 'this' argument discards qualifiers [-fpermissive]
14 | for(const auto i: odds1) {
| ^~~~~
In file included from prog.cc:7:
/opt/wandbox/gcc-head/include/c++/11.0.0/ranges:1280:7: note: in call to 'constexpr std::ranges::filter_view<_Vp, _Pred>::_Iterator std::ranges::filter_view<_Vp, _Pred>::begin() [with _Vp = std::ranges::iota_view<int, std::unreachable_sentinel_t>; _Pred = main()::<lambda(int)>]'
1280 | begin()
| ^~~~~
prog.cc:14:23: error: passing 'const std::ranges::filter_view<std::ranges::iota_view<int, std::unreachable_sentinel_t>, main()::<lambda(int)> >' as 'this' argument discards qualifiers [-fpermissive]
14 | for(const auto i: odds1) {
| ^~~~~
In file included from prog.cc:7:
/opt/wandbox/gcc-head/include/c++/11.0.0/ranges:1294:7: note: in call to 'constexpr auto std::ranges::filter_view<_Vp, _Pred>::end() [with _Vp = std::ranges::iota_view<int, std::unreachable_sentinel_t>; _Pred = main()::<lambda(int)>]'
1294 | end()
| ^~~
Exit Code:
1