Boost Users :
Subject: Re: [Boost-users] Question on std::binary_function template arguments
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-13 12:13:17
on Mon Sep 12 2011, "John M. Dlugosz" <mpbecey7gu-AT-snkmail.com> wrote:
> For now, my question concerns the first template argument to
> std::binary_function. Looking at the declarations for the standard
> mem_fun1_t and mem_fun1_ref_t, I don't know if this should be:
> 1) the full type passed as the first argument to the resulting functor,
> 2) such, but without the final &,
> 3) just the object's type,
> 4..n) something else?
> Can someone clarify that for me?
I know this isn't the answer you're looking for, but IMO you should just
avoid std::binary_function and friends. They don't buy you anything you
can't get from embedding the typedefs directly, and they can inhibit the
empty base optimization.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net