Boost logo

Boost :

Subject: Re: [boost] Generic type inferencer function?
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2015-12-29 04:58:29

Le 24/12/2015 16:21, Jeff Flinn a écrit :
> On 12/21/15 9:14 AM, Nat Goodspeed wrote:
>> On Fri, Dec 18, 2015 at 11:50 AM, Nevin Liber
>> <nevin_at_[hidden]> wrote:
>>> On 18 December 2015 at 10:37, Stefan Seefeld <stefan_at_[hidden]>
>>> wrote:
>>>> On 18.12.2015 11:20, Nat Goodspeed wrote:
>>>>> Am I overlooking a generic boost::make<something>() of this
>>>>> general form?
>>>> Given the small amount of code potentially to be reused, what would be
>>>> the advantage of having a generic version ? The goal of abstraction
>>>> should be clarity, but more often than not, generalizing code rips off
>>>> not only unnecessary details but also its meaning, making the code
>>>> harder, not easier, to understand.
>>> I disagree. The make_* functions are just noise, and I'd love to see a
>>> generic one. While return type deduction has made it somewhat
>>> easier to
>>> write these functions, a generic one would be superior.
>> Nevin speaks truth: the make_SomeTemplate() functions in our code base
>> are just boilerplate.
> IIRC, doesn't boost phoenix have a 'construct' function that is
> effectively a make<...> method. I'm sure I've used that at previous
> employers.
Yes, there is a construct<T> function that calls to the constructor.
This is not exactly what make<> does. make<> does that by default but
can be customized.


Boost list run by bdawes at, gregod at, cpdaniel at, john at