Boost logo

Boost :

Subject: Re: [boost] [type_erasure] call with multiple placeholders
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-07-24 18:24:55


AMDG

On 07/24/2014 04:12 PM, Benedek Thaler wrote:
> 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'm not exactly sure what you're trying to do, but
I'm pretty sure that it's impossible for the same
reason that:

class Base {
  template<class T>
  virtual auto connect_to(const T&) = 0;
};

is impossible.

What you can do is to define connect_to as

void connect_to(any<some_concept, const _self&>);

if establish precisely what the requirements on the
argument are.

In Christ,
Steven Watanabe


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk