Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

C++

Compiler

gcc 4.8.5

Options
Warnings
Boost 1.64.0
C++11
no pedantic

Author

anonymous

almost 5 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 lambda function:
prog.cc:16:63: error: parameter packs not expanded with '...':
       return unwind_protect([&] { return ptr_(std::forward<A>(a)...); });
                                                               ^
prog.cc:16:63: note:         'a'
prog.cc: In instantiation of 'struct protect::function<F>::operator()(A&& ...) const [with A = {}; F = int(); decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) = int]::__lambda0':
prog.cc:16:72:   required from 'decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) protect::function<F>::operator()(A&& ...) const [with A = {}; F = int(); decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) = int]'
prog.cc:38:19:   required from here
prog.cc:16:63: error: using invalid field 'protect::function<F>::operator()(A&& ...) const::__lambda0::__a'
prog.cc: In instantiation of 'struct protect::function<F>::operator()(A&& ...) const [with A = {int}; F = int(int); decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) = int]::__lambda0':
prog.cc:16:72:   required from 'decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) protect::function<F>::operator()(A&& ...) const [with A = {int}; F = int(int); decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) = int]'
prog.cc:38:33:   required from here
prog.cc:16:63: error: using invalid field 'protect::function<F>::operator()(A&& ...) const::__lambda0::__a'
prog.cc: In member function 'decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) protect::function<F>::operator()(A&& ...) const [with A = {}; F = int(); decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) = int]':
prog.cc:17:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
prog.cc: In member function 'decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) protect::function<F>::operator()(A&& ...) const [with A = {int}; F = int(int); decltype (declval<F*>()((forward<A>)(protect::function::operator()::a)...)) = int]':
prog.cc:17:5: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
Exit Code:
1