Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc HEAD 9.0.1 20190207 (experimental)

Options
Warnings
Boost 1.68.0
C++17(GNU)
no pedantic

Author

anonymous

over 6 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++17
prog.cc: In function 'int main()':
prog.cc:139:16: warning: variable 'resource1' set but not used [-Wunused-but-set-variable]
  139 |     const auto resource1 = HOOK(FooResouce( 1, "context1"));
      |                ^~~~~~~~~
prog.cc:140:16: warning: variable 'resource2' set but not used [-Wunused-but-set-variable]
  140 |     const auto resource2 = HOOK(FooResouce(-1, "context2"));
      |                ^~~~~~~~~
prog.cc:141:16: warning: variable 'resource3' set but not used [-Wunused-but-set-variable]
  141 |     const auto resource3 = HOOK(FooResouce( 7, "context3"));
      |                ^~~~~~~~~
Runtime error: prog.cc, l.140, FooResouce(-1, "context2"), upper level.
SomeException error: context:context2, prog.cc, l.131, Ctor failed.
Exit Code:
0