
25 Feb
2004
25 Feb
'04
10:22 a.m.
Hi, I just had a couple of bugs caused by the fact that constructor of boost::any is not explicit. For example: void do_something(boost::any& v) { ... } class variable { ///// boost::any& value() {} }; variable v; do_something(v); The intention was to call do_somethin on 'v.value()' but non-explicit ctor is happy to accept 'variable', after which 'do_something' breaks. Anybody has an opinion? Is non-explicit ctor really necessary? - Volodya