Boost logo

Boost :

Subject: Re: [boost] [utility/value_init] boost::value_initialized<T> direct-initialized?
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-04-02 12:45:43

Steven Watanabe wrote:
> Niels Dekker - address until 2010-10-10 wrote:
>> Jeffrey Lee Hellrung, Jr. wrote:
>>> What do you think about using the templated constructor *and* SFINAE out
>>> via enable_if the binding of U to initialized<T> (or, maybe, to any
>>> class derived from initialized<T>)?
>> SFINAE/enable_if might be interesting indeed, but I'm not sure if it's
>> really necessary. And I don't think it will help to work around the
>> specific MSVC bug
>> <>.
>> Here is an example that fails to compile on MSVC because of the
>> compiler bug. Please let me know if you can fix it by SFINAE. (But I'm
>> afraid it won't work.)
> I'm not sure if I missed something, but this seems to work
> template<class U>
> explicit initialized(const U& arg,
> typename
> boost::disable_if<boost::is_base_and_derived<initialized, U> >::type* = 0)

That's what I had in mind.

Although, echoing Steven: Maybe we should just settle for the dead plain
simple initialized(const T&) constructor.

- Jeff

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