Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang 3.1

Options
Warnings
Don't Use Boost
C++11(GNU)
no pedantic

Author

anonymous

over 6 years ago

$ clang++ prog.cc -Wall -Wextra -std=gnu++11
prog.cc:13:24: error: non-constant-expression cannot be narrowed from type 'int' to 'short' in initializer list [-Wc++11-narrowing]
  int n = sizeof(short{duration(duration())});
                       ^~~~~~~~~~~~~~~~~~~~
prog.cc:13:24: note: override this message by inserting an explicit cast
  int n = sizeof(short{duration(duration())});
                       ^~~~~~~~~~~~~~~~~~~~
                       static_cast<short>( )
1 error generated.
Exit Code:
1