Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

gcc HEAD 9.0.1 20190315 (experimental)

Options
Boost 1.69.0
C++17
no pedantic

Author

anonymous

over 6 years ago

$ g++ prog.cc -I/opt/wandbox/boost-1.69.0/gcc-head/include -std=c++17
prog.cc: In instantiation of 'B<C>::B(Args&& ...) [with Args = {A2<main()::<lambda(int)> >&}; C = main()::<lambda(int)>]':
prog.cc:13:59:   required from 'A2<T>::A2(Args&& ...) [with Args = {A2<main()::<lambda(int)> >&}; T = main()::<lambda(int)>]'
prog.cc:42:31:   required from here
prog.cc:3:55: error: 'main()::<lambda(int)>' is an inaccessible base of 'A2<main()::<lambda(int)> >'
    3 |   B(Args &&... args) : C{static_cast<Args &&>(args)...} {};
      |                                                       ^
prog.cc: In instantiation of 'B<C>::B(Args&& ...) [with Args = {A3<main()::<lambda(int)> >&}; C = main()::<lambda(int)>]':
prog.cc:17:23:   required from 'A3<T>::A3(A3<T>&) [with T = main()::<lambda(int)>]'
prog.cc:47:31:   required from here
prog.cc:3:55: error: 'main()::<lambda(int)>' is an inaccessible base of 'A3<main()::<lambda(int)> >'
Exit Code:
1