Author
anonymous
almost 5 years ago
Language
C++
Compiler
gcc HEAD 11.0.0 20200906 (experimental)
Options
Warnings
Optimization
Don't Use Boost
C++2a
-pedantic
Raw compiler options
-fopenmp
-Wshadow
-Wno-unused-variable
-Wno-unused-but-set-variable
Author
anonymous
almost 5 years ago
$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++2a -pedantic -fopenmp -Wshadow -Wno-unused-variable -Wno-unused-but-set-variable
prog.cc:7:5: error: 'MyFixedContainer' does not name a type
7 | MyFixedContainer* ptr;
| ^~~~~~~~~~~~~~~~
prog.cc:10:33: error: expected ')' before '*' token
10 | MyIterator( MyFixedContainer* ptr_, unsigned int offset_ ): ptr{ ptr_},offset{offset_}{}
| ~ ^
| )
prog.cc:10:75: error: expected unqualified-id before ',' token
10 | MyIterator( MyFixedContainer* ptr_, unsigned int offset_ ): ptr{ ptr_},offset{offset_}{}
| ^
prog.cc:10:91: error: expected unqualified-id before '{' token
10 | MyIterator( MyFixedContainer* ptr_, unsigned int offset_ ): ptr{ ptr_},offset{offset_}{}
| ^
prog.cc: In member function 'bool MyIterator::operator==(MyIterator&) const':
prog.cc:14:18: error: 'ptr' was not declared in this scope
14 | return ( ptr == other.ptr )&& ( offset == other.offset );
| ^~~
prog.cc:14:31: error: 'class MyIterator' has no member named 'ptr'
14 | return ( ptr == other.ptr )&& ( offset == other.offset );
| ^~~
prog.cc: In member function 'auto MyFixedContainer::begin()':
prog.cc:42:47: error: no matching function for call to 'MyIterator::MyIterator(<brace-enclosed initializer list>)'
42 | auto begin() { return MyIterator{ this, 0 }; }
| ^
prog.cc:5:7: note: candidate: 'constexpr MyIterator::MyIterator()'
5 | class MyIterator
| ^~~~~~~~~~
prog.cc:5:7: note: candidate expects 0 arguments, 2 provided
prog.cc:5:7: note: candidate: 'constexpr MyIterator::MyIterator(const MyIterator&)'
prog.cc:5:7: note: candidate expects 1 argument, 2 provided
prog.cc:5:7: note: candidate: 'constexpr MyIterator::MyIterator(MyIterator&&)'
prog.cc:5:7: note: candidate expects 1 argument, 2 provided
prog.cc: In member function 'auto MyFixedContainer::end()':
prog.cc:43:44: error: no matching function for call to 'MyIterator::MyIterator(<brace-enclosed initializer list>)'
43 | auto end() { return MyIterator{ this, 4}; }
| ^
prog.cc:5:7: note: candidate: 'constexpr MyIterator::MyIterator()'
5 | class MyIterator
| ^~~~~~~~~~
prog.cc:5:7: note: candidate expects 0 arguments, 2 provided
prog.cc:5:7: note: candidate: 'constexpr MyIterator::MyIterator(const MyIterator&)'
prog.cc:5:7: note: candidate expects 1 argument, 2 provided
prog.cc:5:7: note: candidate: 'constexpr MyIterator::MyIterator(MyIterator&&)'
prog.cc:5:7: note: candidate expects 1 argument, 2 provided
prog.cc: In member function 'int MyIterator::operator*() const':
prog.cc:53:12: error: 'ptr' was not declared in this scope
53 | return ptr->Get( offset );
| ^~~
prog.cc: In function 'int main()':
prog.cc:69:19: error: 'std::views' has not been declared
69 | auto y = std::views::filter(c, even);
| ^~~~~
Exit Code:
1