|
Boost : |
Subject: [boost] [type_erasure] call with multiple placeholders
From: Benedek Thaler (thalerbenedek_at_[hidden])
Date: 2014-07-24 18:12:12
Hi,
I have the following type erasure setup:
https://github.com/erenon/pipeline/blob/type_erasure/include/boost/pipeline/type_erasure.hpp
I'd like to make `any` have a method template, `connect_to`, i.e:
class any {
template <typename T> auto connect_to(const T&) {}
}
I have a concept, added to the main concept like this:
detail::has_connect_to<type_erasure::_self, type_erasure::_a>
And also a concept_interface specialization. (Bottom of the file in the
link above)
The doc says:
"When there are multiple placeholders involved, you will have to use tuple,
or pass the bindings explicitly, but the substitution still works the same
way. "
I'm trying to do just like this, but without success. Errors include:
error: âconst struct boost::type_erasure::_selfâ has no member named
âconnect_toâ
error: âapplyâ is not a member of
âboost::pipeline::detail::has_connect_to<boost::type_erasure::_self,
boost::type_erasure::_a>â
*error: no matching function for call to
âcall(boost::type_erasure::concept_interface<...[snip]...>`*
I think the last one is the core issue, but I can't figure out how to pass
the binding properly. I don't know why does concept_interface show up as
the first argument.
Thanks,
Benedek
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk