Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 4 years ago

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Optimization
Don't Use Boost
C++17
-pedantic-errors

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]
Exit Code:
1