Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // I want template in lambdas (exists something like that?)
- fes::sync<std::string> process;
- process.connect(
- template <typename ... Args>
- [](Args&& ... args) {
- auto src = m::make_tuple(std::forward<Args>(args)...);
- // ...
- }
- );
- // but don't compile in clang 3.6 (c++14)
- // my solution now is use functor with variadic templates, works!
- class serialize_functor
- {
- public:
- template <typename ... Args>
- void operator()(Args&& ... args)
- {
- auto src = m::make_tuple(std::forward<Args>(args)...);
- // ...
- }
- };
- fes::sync<std::string> process;
- process.connect(ser::unserialize_functor<int, bool, std::string>());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement