Boost logo

Boost :

Subject: Re: [boost] [utility/value_init] boost::value_initialized<T> direct-initialized?
From: Niels Dekker - address until 2010-10-10 (niels_address_until_2010-10-10_at_[hidden])
Date: 2010-04-03 08:08:03


>> 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
>> <http://connect.microsoft.com/VisualStudio/feedback/details/423737>.

Steven Watanabe wrote:
> 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)

Yes it does! Thanks, Steven. Sorry, I was wrong, thinking that it
wouldn't work!

Still I'd rather postpone adding a templated initialized(const U&)
constructor until we have a user request and/or a motivating use case.
For the time being I think a non-templated initialized(const T&)
constructor should be sufficient, for the new boost::initialized<T>.

Kind regards,

   Niels

-- 
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center

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