Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2007-06-15 17:50:16


Tobias Schwinger wrote:
> Tobias Schwinger wrote:
>> Peter Dimov wrote:
>>> Tobias Schwinger wrote:
>>>> Peter Dimov wrote:
>>> ...
>>>
>>>>> Why is there a need to detect a default constructor?
>>>> (I probably snipped away too much context...)
>>>>
>>>> A generic function object that constructs an arbitrary type would have
>>>> to know (unless having variadic templates, or being able to define
>>>> operator() as a nonmember function template).
>>> Umm. Why?
>> OK, in the bind case nullary operator() can just be omitted (if there
>> are no parameters there's no point to use bind in the first place).
>>
>> But for the Fusion sequence case that wrapper would have to be entirely
>> generic (IOW allow nullary calls if there is an appropriate
>> constructor), because the sequence can be empty.
>
> No. I just noticed it just works fine without - sorry for the noise.
>
                                                ^
[ knowing whether T is default constructible, because the signature can
be instantiated ]

--
Tobias

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