Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 4 years ago

Language

C++

Compiler

gcc 9.3.0

Options
Warnings
Boost 1.73.0
C++2a
no pedantic

Author

anonymous

about 4 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-9.3.0/include -std=c++2a
prog.cc:10:6: error: expected ';' after struct definition
   10 |     }
      |      ^
      |      ;
prog.cc:13:34: error: ISO C++ forbids declaration of 'operator()' with no type [-fpermissive]
   13 |     operator()(Rng &r, Pred &pred)
      |                                  ^
prog.cc:25:1: error: expected '}' at end of input
   25 | }
      | ^
prog.cc:2:19: note: to match this '{'
    2 | struct filter_view{
      |                   ^
prog.cc: In member function 'int filter_view<T>::operator()(Rng&, Pred&)':
prog.cc:15:14: error: 'vector' is not a member of 'std'
   15 |         std::vector<T> temp; // temps mean copying, views don't do that I know...
      |              ^~~~~~
prog.cc:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
  +++ |+#include <vector>
    1 | template <typename T>
prog.cc:15:22: error: expected primary-expression before '>' token
   15 |         std::vector<T> temp; // temps mean copying, views don't do that I know...
      |                      ^
prog.cc:15:24: error: 'temp' was not declared in this scope
   15 |         std::vector<T> temp; // temps mean copying, views don't do that I know...
      |                        ^~~~
prog.cc:16:9: error: 'ranges' has not been declared
   16 |         ranges::for(iter : r)
      |         ^~~~~~
prog.cc:16:17: error: expected unqualified-id before 'for'
   16 |         ranges::for(iter : r)
      |                 ^~~
prog.cc: At global scope:
prog.cc:25:2: error: expected ';' at end of input
   25 | }
      | ~^
      |  ;
Exit Code:
1