Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-06-15 10:50:52

Tobias Schwinger wrote:
> Tobias Schwinger wrote:
>> // [...] tricky nullary case with default ctor detection
>> // omitted for simplicity
> Doh! It's not possible to detect default constructibility, correct?
> So we'd have to declare it as
> template<typename T, typename DefaultConstructible = mpl::false_>
> struct constructor;

No. If the interface is "construct<T>(sequence)", then you can dispatch
on the size of the sequence. You'd only try to default construct when
you pass an empty sequence.

Eric Niebler
Boost Consulting
The Astoria Seminar ==>

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