Closed stkrwork closed 7 years ago
It does also not compile with clang++. Here is the log:
10:16:43 Incremental Build of configuration Debug for project SiliconTest make pre-build main-build iod_generate_symbols ../main.cpp ../symbols.h
Building file: ../main.cpp
Invoking: Cross G++ Compiler
clang++ -std=c++14 -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp"
In file included from ../main.cpp:40:
In file included from /include/silicon/remote_api.hh:4:
/include/silicon/backends/ws_api.hh:144:12: error: no matching function for call to 'route_cat'
return route_cat(ws_route<>(), e);
^~~~~
/include/silicon/remote_api.hh:40:28: note: in instantiation of function template specialization 'sl::make_ws_route<iod::function_call_exp<s::_message_t, s::_text_t> >' requested here
return std::make_tuple(make_ws_route(procs)...);
^
/include/silicon/backends/websocketpp_remote_client.hh:106:16: note: in instantiation of function template specialization 'sl::make_ws_remote_api<iod::function_call_exp<s::_message_t, s::_text_t> >' requested here
auto api = make_ws_remote_api(procedures...);
^
../main.cpp:100:18: note: in instantiation of function template specialization 'sl::make_wspp_remote_client<iod::function_call_exp<s::_message_t, s::_text_t> >' requested here
auto rclient = make_wspp_remote_client( _message(_text) );
^
/include/silicon/http_route.hh:284:8: note: candidate template ignored: could not match 'http_route' against 'ws_route'
auto route_cat(const http_route<R1...>& r1,
^
/include/silicon/http_route.hh:291:8: note: candidate template ignored: could not match 'http_route' against 'ws_route'
auto route_cat(const http_route<R1...>& r1,
^
/include/silicon/rmq_route.hh:164:7: note: candidate template ignored: could not match 'route' against 'ws_route'
auto route_cat(rmq::route<R1...> const & r1,
^
/include/silicon/rmq_route.hh:171:7: note: candidate template ignored: could not match 'route' against 'ws_route'
auto route_cat(rmq::route<R1...> const & r1,
^
/include/silicon/backends/ws_api.hh:118:8: note: candidate template ignored: could not match 'symbol' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const iod::symbol~~~~
/include/iod/utils.hh:24:14: note: in instantiation of function template specialization 'sl::parse_api(std::tuple<assign_exp<function_call_exp<_broadcast_t, _message_t>, (lambda at ../main.cpp:106:28)> >, sl::ws_route<std::tuple<>, iod::sio<> >)::(anonymous class)::operator()(iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)>)::(anonymous class)::operator()<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> >' requested here
return _else(std::forward(args)...);
^
/include/iod/utils.hh:31:12: note: in instantiation of function template specialization 'iod::staticif
^
/include/iod/foreach.hh:152:16: note: in instantiation of function template specialization 'iod::internal::foreach_tuple_caller<std::tuple<std::tuple<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> > &> >::run<(lambda at /include/silicon/api.hh:208:27), 0>' requested here
return run(f, std::make_index_sequence<std::tuple_size
^
/include/iod/foreach.hh:152:16: note: in instantiation of function template specialization 'iod::internal::foreach_tuple_caller<std::tuple<std::tuple<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> > &> >::run<(lambda at /include/silicon/api.hh:208:27), 0>' requested here
return run(f, std::make_index_sequence<std::tuple_size
10:16:52 Build Finished (took 8s.181ms)
Thanks for this report, I'll have a look this week end. I'll also add the compilation of this example too travis-ci.
Which version of g++ and clang do you have ? I have no problem compiling the websocket broadcast example (examples/ws_broadcast_server.cc) with g++6.3.1 and clang-3.9.1.
i used the example on your documentation website. I already found the error, there is a difference at rcclient. the parameters passed on to it in the code on the docu site is different than in the code in the examples/ folder.
This is the example I used that time: http://siliconframework.org/docs/websocketpp.html
I'll replace the code of this page by a link to the real example.
Here is the console output: 09:55:21 Incremental Build of configuration Debug for project SiliconTest make pre-build main-build iod_generate_symbols ../main.cpp ../symbols.h
Building file: ../main.cpp Invoking: Cross G++ Compiler g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.cpp" In file included from /usr/include/silicon/remote_api.hh:4:0, from ../main.cpp:40: /usr/include/silicon/backends/ws_api.hh: In instantiation of ‘auto sl::make_ws_route(const E&) [with E = iod::function_call_exp<s::_message_t, s::_text_t>]’: /usr/include/silicon/remote_api.hh:40:41: required from ‘auto sl::make_ws_remote_api(P ...) [with P = {iod::function_call_exp<s::_message_t, s::_text_t>}]’ /usr/include/silicon/backends/websocketpp_remote_client.hh:106:34: required from ‘auto sl::make_wspp_remote_client(const P& ...) [with P = {iod::function_call_exp<s::_message_t, s::_text_t>}]’ ../main.cpp:100:59: required from here /usr/include/silicon/backends/ws_api.hh:144:21: error: no matching function for call to ‘route_cat(sl::ws_route<>, const iod::function_call_exp<s::_message_t, s::_text_t>&)’ return route_cat(ws_route<>(), e);