Language
C++
Compiler
gcc 11.1.0
Options
Warnings
Optimization
Don't Use Boost
C++17
-pedantic-errors
$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++17 -pedantic-errors Exit Code:
1
Author
anonymous
over 4 years ago
C++
gcc 11.1.0
Author
anonymous
over 4 years ago
$ g++ prog.cc -Wall -Wextra -O2 -march=native -std=c++17 -pedantic-errors prog.cc: In function 'int main()':
prog.cc:20:26: error: narrowing conversion of 'n' from 'size_t' {aka 'long unsigned int'} to 'float' [-Wnarrowing]
20 | MyVector<float> foo{ n, 2.f };
| ^
prog.cc:20:26: error: narrowing conversion of 'n' from 'size_t' {aka 'long unsigned int'} to 'float' [-Wnarrowing]