Boost logo

Boost :

From: Joel de Guzman (joel_at_[hidden])
Date: 2007-06-18 16:28:47


Tobias Schwinger wrote:
> Eric Niebler wrote:
>> Tobias Schwinger wrote:
>>> Marcus Lindblom wrote:
>>>> Tobias Schwinger wrote:
>>>>> Dear Boost community,
>>>>>
>>>>> do we have a function object template to wrap arbitrary constructor
>>>>> calls / operator new expressions somewhere in Boost, already?
>>>>>
>>>> lambda::new_ptr ?
>>> Yep, 'new_ptr' and 'constructor' are almost exactly what I want.
>>>
>>> Those templates are missing a 'result_type' typedef to become usable as
>>> "stand-alone function objects" (outside of Boost.Lambda expressions).
>>>
>>> Further, the limits are a bit too low for constructing Fusion Sequences
>>> and having them configurable would be nice to have, too...
>> Yes and IMO these things should be called new_ and construct.
>>
>
> Yep, 'new_ptr' is sorta strange ;-).
>
> I'm not too convinced that 'construct' gives a better name than
> 'constructor', because looking at
>
> construct<T>()
>
> I get the impression that something gets constructed, but in reality
> it's just about capturing T's constructor in order to pass it around.

So what? They're just lazy!

I second Eric. "new_" and "construct" are better names.
Subjective, nonetheless, but that's how it's spelled in Phoenix
(ahem :) ahem). So, do I change all the names because phoenix
functions are lazy?

Regards,

-- 
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk