
26 Feb
2004
26 Feb
'04
2:46 p.m.
Kevlin Henney wrote:
I outlined in a previous email the intended syntax for use. To break this would be more than a little inconvenient, and certainly against the spirit of its design. Making the constructor 'explicit' would break the compilation of other code that is quite reasonable -- perhaps not yours, because you are following the style I outlined as an alternative in a previous response -- but it would still break it and for no good reason, eg
std::map<std::string, boost::any> table; ... table[key] = 0; // reasonable usage
This use case does not need an implicit constructor, just a templated operator=.