Boost logo

Boost :

From: Bjorn.Karlsson_at_[hidden]
Date: 2004-02-25 09:01:59

> From: Edward Diener [mailto:eddielee_at_[hidden]]
> > The intention was to call do_somethin on 'v.value()' but
> non-explicit
> > ctor is happy to accept 'variable', after which
> 'do_something' breaks.
> This is a programming error, not an error in boost::any.

Absolutely, but it's an error that could have been detected by the compiler
given an explicit constructor.
> While I am not against syntactic sugar which make it
> easier to use
> C++ constructs, I am against making a constructor explicit
> just to keep
> programmers from making errors.

Isn't keeping programmers from making errors a Good Thing? For me, that's
exactly the reason why boost::any's constructor _should_ be explicit.


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