$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] identity function
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-10-01 20:38:29
AMDG
On 10/01/2011 05:57 AM, Krzysztof Żelechowski wrote:
> I use the following function on a regular basis:
>
> template < class P_T > P_T const &same (P_T const &p) { return p; }
>
> I use it for two purposes:
>
> 1. to pass an identity function to an API that expects a unary function,
Use boost::lambda::_1.
In Christ,
Steven Watanabe