Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 4 years ago

Language

C++

Compiler

gcc 4.8.5

Options
Warnings
Boost 1.64.0
C++11
no pedantic

Author

anonymous

over 4 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/gcc-4.8.5/include -std=c++11
prog.cc: In instantiation of 'odd_sizeof(const Args& ...) [with Args = {int, int, int}; size_t = long unsigned int]::__lambda0':
prog.cc:5:12:   required from 'struct odd_sizeof(const Args& ...) [with Args = {int, int, int}; size_t = long unsigned int]::__lambda0'
prog.cc:5:41:   required from 'size_t odd_sizeof(const Args& ...) [with Args = {int, int, int}; size_t = long unsigned int]'
prog.cc:9:21:   required from here
prog.cc:5:28: error: expansion pattern 'args#0' contains no argument packs
   return [&]{ return sizeof...(args); }();
                            ^
prog.cc: In instantiation of 'size_t odd_sizeof(const Args& ...) [with Args = {int, int, int}; size_t = long unsigned int]':
prog.cc:9:21:   required from here
prog.cc:5:41: error: void value not ignored as it ought to be
   return [&]{ return sizeof...(args); }();
                                         ^
prog.cc: In function 'size_t odd_sizeof(const Args& ...) [with Args = {int, int, int}; size_t = long unsigned int]':
prog.cc:6:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Exit Code:
1