prog.cpp: In static member function ‘static char (& HasFoo::test(HasFoo::SFINAE<C, (& C::foo)>*))[1]’:
prog.cpp:14: warning: no return statement in function returning non-void
prog.cpp: In static member function ‘static char (& HasFoo::test(...))[2]’:
prog.cpp:19: warning: no return statement in function returning non-void
prog.cpp: In function ‘int main()’:
prog.cpp:31: error: ‘void D1::foo()’ is private
prog.cpp:46: error: within this context
prog.cpp:31: error: ‘void D1::foo()’ is private
prog.cpp:46: error: within this context
prog.cpp: In static member function ‘static char (& HasFoo::test(HasFoo::SFINAE<C, (& C::foo)>*))[1] [with C = D1]’:
prog.cpp:31: error: ‘void D1::foo()’ is private
prog.cpp:46: error: within this context
prog.cpp: In static member function ‘static char (& HasFoo::test(HasFoo::SFINAE<C, (& C::foo)>*))[1] [with C = B]’:
prog.cpp:45: instantiated from here
prog.cpp:14: warning: no return statement in function returning non-void
prog.cpp: In static member function ‘static char (& HasFoo::test(HasFoo::SFINAE<C, (& C::foo)>*))[1] [with C = D1]’:
prog.cpp:46: instantiated from here
prog.cpp:31: error: ‘void D1::foo()’ is private
prog.cpp:11: error: within this context
prog.cpp:31: error: ‘void D1::foo()’ is private
prog.cpp:11: error: within this context
prog.cpp:14: warning: no return statement in function returning non-void
prog.cpp: In static member function ‘static char (& HasFoo::test(...))[2] [with C = D2]’:
prog.cpp:47: instantiated from here
prog.cpp:19: warning: no return statement in function returning non-void
prog.cpp: In static member function ‘static char (& HasFoo::test(...))[2] [with C = D3]’:
prog.cpp:48: instantiated from here
prog.cpp:19: warning: no return statement in function returning non-void