From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2004-02-26 10:05:34
On Thu, 26 Feb 2004 14:32:53 +0300
Vladimir Prus <ghost_at_[hidden]> wrote:
> That's right. I used my case, where convenience was not hurt, to
> illustrate the the decision that ctor should not be explicit is not
> entirely obvious.
Obviously, Kelvin does not want to make the ctor explicit, and even if
he did, the change would most likely break existing code. However, some
users may desire the pedantic behavior of an explicit constructor. What
would be wrong with changing the ctor to be something like this...
any(const ValueType & value)
: content(new holder<ValueType>(value))
then users can get the functionality if they want it, but, by default,
you get the same behavior. Since the implementation is an inline member
template, there should be no linking issues.
Of course, it is yet another macro...
-- Jody Hagins Power corrupts. And atomic power corrupts atomically.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk