Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-02-02 19:52:50


"Peter Dimov" <pdimov_at_[hidden]> writes:

> David Abrahams wrote:
>> Peter Dimov <pdimov <at> mmltd.net> writes:
>>
>>> David Abrahams wrote:
>>>> Is it really true that I can write
>>>>
>>>> bind(f, _1) > _2
>>>>
>>>> but can't write
>>>>
>>>> _1 > _2
>>>>
>>>> ??
>>>
>>> A limitation of the current implementation. On some compilers, the
>>> placeholders are function pointers and _1 > _2 can't be overloaded.
>>> There's no other technical reason that prevents _1 > _2 (or _1 > 0)
>>> from working; it'd fall out of the specification.
>>
>> Peter, is there still a good reason for this implementation detail?
>
> The reason is still as stated above. :-)

I mean, is there a reason that borland and GCC need to use function pointers?

>> If people could write:
>>
>>
>> *_1 < *_2
>>
>> it would make a killer demo.
>
> *_1 < *_2 is different, as the subexpression *_1 requires return type
> deduction. This is Lambda territory at the moment; Boost.Bind doesn't do
> deduction.

Yeah, OK.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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