[C++-sig] Re: My latest project
dave at boost-consulting.com
Mon Aug 16 20:51:43 CEST 2004
"Neal D. Becker" <ndbecker2 at verizon.net> writes:
>>>> I have only 2 quick comments in this one:
>>>> 1. You should never use std::[binary|unary]_function because it
>>>> suppresses EBO. Consider what happens when you have a
>>>> compressed_pair<minus<int>,plus<int> >.
>>> OK. I assume this means "Empty Base Optimization?"
> Why is this important?
consider the size of
bind(times, bind(plus, _1, _2), bind(minus, _1, _2))
> Is this comment just made as a general principle, or does it relate
> to the actual use in the vector arithmetic I wrote?
It will probably be relevant eventually since you seem to be
trying to write general-purpose standalone vector arithmetic. Who
knows how your vectors (etc.) may be used?
More information about the Cplusplus-sig