|
Boost : |
Subject: Re: [boost] [Fit] Review
From: Edward Diener (eldiener_at_[hidden])
Date: 2016-03-11 07:27:24
On 3/11/2016 4:52 AM, Peter Dimov wrote:
> Edward Diener wrote:
>
>> I don't understand this. I have a 'make_tuple' callable above and if I
>> want to use it somewhere else I pass it to whatever functionality
>> needs it. You, instead want things to be global so that they can be
>> used by other functionality without passing anything around. Isn't
>> this just an argument about programming style ?
>
> No.
>
> Your assignment is to define a make_tuple function in a header, say
> "make_tuple.hpp", so that other people can use it. This is supposedly a
> part from a library that allows the user to manipulate tuples. I don't
> understand your confusion and your reference to programming styles.
My confusion comes from the fact that I did not realize that Fit was
actually defining a function. I thought instead that Fit was taking a
Callable and ghenerating another Callable when using Fit's
functionality, in much the same way that boost::bind does. I know that
the macro in Fit is called BOOST_FIT_STATIC_FUNCTION ( or
BOOST_FIT_STATIC_LAMBDA ) but the term 'function' in the Fit
documentation is so often used when Callable is the actual correction
designation that I thought that this was one more instance of this
usage. Thanks for straightening me out with your explanation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk