|
Boost : |
Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-07-23 15:55:25
AMDG
On 07/23/2012 09:07 AM, Andrey Semashev wrote:
>
> If there is a way to describe the operator when the result type differs from
> the both argument types, the mentioned example doesn't show that. Actually, is
> this possible with the library?
>
Yes. The return type can be any placeholder
or a specific type.
addable<_a, _a, double> // a + a -> double
addable<_a, _b, _c> // a + b -> c
However, it adds extra complexity because
all the placeholders still need to be
bound.
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