Coder Social home page Coder Social logo

Comments (5)

stkrwork avatar stkrwork commented on August 10, 2024

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& s)
^
/include/silicon/backends/ws_api.hh:124:8: note: candidate template ignored: could not match 'params_t' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const params_t& s)
^
/include/silicon/backends/ws_api.hh:130:8: note: candidate template ignored: could not match 'div_exp' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const iod::div_exp<L, R>& e)
^
/include/silicon/backends/ws_api.hh:136:8: note: candidate template ignored: could not match 'mult_exp' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const iod::mult_exp<L, R>& e)
^
In file included from ../main.cpp:39:
/include/silicon/api.hh:216:20: error: no matching function for call to 'route_cat'
auto r = route_cat(route, m.left);
^~~~~~~~~
/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::static_if
::operator()<(lambda at /include/silicon/api.hh:211:9), (lambda at /include/silicon/api.hh:215:9), iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::message_t>, (lambda at ../main.cpp:106:28)> &>' requested here
return static_if
()(_if, _else, std::forward(args)...);
^
/include/silicon/api.hh:210:14: note: in instantiation of function template specialization 'iod::static_if<false, (lambda at /include/silicon/api.hh:211:9), (lambda at /include/silicon/api.hh:215:9), iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> &>' requested here
return static_if<is_tuple<decltype(m.right)>::value>(
^
/include/iod/foreach.hh:116:28: 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)> >' requested here
using Ret = decltype(f(std::get<0>(t1), std::get<0>(ts)...));
^
/include/iod/foreach.hh:146:31: note: in instantiation of function template specialization 'iod::internal::tuple_foreach<(lambda at /include/silicon/api.hh:208:27), std::tuple<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::message_t>, (lambda at ../main.cpp:106:28)> > &>' requested here
return iod::internal::tuple_foreach(f, std::get(t
)...);
^
/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::value>{});
^
/include/silicon/api.hh:208:25: 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)> > &> >::operator|<(lambda at /include/silicon/api.hh:208:27)>' requested here
return foreach(api) | [&] (auto m) // m should be iod::assign_exp
^
/include/silicon/backends/ws_api.hh:150:12: note: in instantiation of function template specialization 'sl::parse_api<sl::ws_route<std::tuple<>, iod::sio<> >, iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> >' requested here
return parse_api(std::make_tuple(procs...), ws_route<>());
^
../main.cpp:103:21: note: in instantiation of function template specialization 'sl::ws_api<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> >' requested here
auto server_api = ws_api(
^
/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& s)
^
/include/silicon/backends/ws_api.hh:124:8: note: candidate template ignored: could not match 'params_t' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const params_t& s)
^
/include/silicon/backends/ws_api.hh:130:8: note: candidate template ignored: could not match 'div_exp' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const iod::div_exp<L, R>& e)
^
/include/silicon/backends/ws_api.hh:136:8: note: candidate template ignored: could not match 'mult_exp' against 'function_call_exp'
auto route_cat(ws_route<S, P> r, const iod::mult_exp<L, R>& e)
^
In file included from ../main.cpp:39:
In file included from /include/silicon/api.hh:4:
In file included from /include/iod/sio.hh:9:
In file included from /include/iod/grammar.hh:6:
/include/iod/foreach.hh:22:14: error: no matching function for call to object of type '(lambda at /include/silicon/api.hh:208:27)'
return f(std::get(ts)...);
^
/include/iod/foreach.hh:41:45: note: in instantiation of function template specialization 'iod::internal::tuple_foreach_i<0, (lambda at /include/silicon/api.hh:208:27), std::tuple<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> > &>' requested here
return std::make_tuple(iod::internal::tuple_foreach_i(f, std::forward(ts)...)...);
^
/include/iod/foreach.hh:117:29: note: in instantiation of function template specialization 'iod::internal::tuple_foreach_impl<int, (lambda at /include/silicon/api.hh:208:27), 0, std::tuple<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> > &>' requested here
return iod::internal::tuple_foreach_impl(0, seq{},
^
/include/iod/foreach.hh:146:31: note: in instantiation of function template specialization 'iod::internal::tuple_foreach<(lambda at /include/silicon/api.hh:208:27), std::tuple<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::message_t>, (lambda at ../main.cpp:106:28)> > &>' requested here
return iod::internal::tuple_foreach(f, std::get(t
)...);
^
/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::value>{});
^
/include/silicon/api.hh:208:25: 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)> > &> >::operator|<(lambda at /include/silicon/api.hh:208:27)>' requested here
return foreach(api) | [&] (auto m) // m should be iod::assign_exp
^
/include/silicon/backends/ws_api.hh:150:12: note: in instantiation of function template specialization 'sl::parse_api<sl::ws_route<std::tuple<>, iod::sio<> >, iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> >' requested here
return parse_api(std::make_tuple(procs...), ws_route<>());
^
../main.cpp:103:21: note: in instantiation of function template specialization 'sl::ws_api<iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)> >' requested here
auto server_api = ws_api(
^
/include/silicon/api.hh:208:27: note: candidate template ignored: substitution failure [with $0 = iod::assign_exp<iod::function_call_exp<s::_broadcast_t, s::_message_t>, (lambda at ../main.cpp:106:28)>]
return foreach(api) | [&] (auto m) // m should be iod::assign_exp
^
3 errors generated.
make: *** [main.o] Error 1
subdir.mk:18: recipe for target 'main.o' failed

10:16:52 Build Finished (took 8s.181ms)

from silicon.

matt-42 avatar matt-42 commented on August 10, 2024

Thanks for this report, I'll have a look this week end. I'll also add the compilation of this example too travis-ci.

from silicon.

matt-42 avatar matt-42 commented on August 10, 2024

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.

from silicon.

stkrwork avatar stkrwork commented on August 10, 2024

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

from silicon.

matt-42 avatar matt-42 commented on August 10, 2024

I'll replace the code of this page by a link to the real example.

from silicon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.