Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-06-14 17:43:07


Eric Niebler wrote:
> JOAQUIN LOPEZ MU?Z wrote:
>>
>> Maybe the following is not relevant to the discussion, but I
>> recall a post by Anthony Williams which shows how to create
>> a _1-like global entity in an entirely ODR-abiding way:
>>
>> http://lists.boost.org/Archives/boost/2006/07/108355.php
>
> This is not a general technique. For applications like Lambda, things
> like _1[i] should be possible, and that's not possible if _1 is a
> pointer to an inline function.

Yep. _1 == _2, _1 == 0 are even worse because they compile. There is also

template<class T> void f( T const & t )
{
    T t2( t );
}

int main()
{
    f( _1 );
}


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