22 Feb
2004
22 Feb
'04
9:09 p.m.
On Sun, 22 Feb 2004 20:36:54 -0000, Keith MacDonald wrote:
Hmmm. I've been trying to use various members of the boost library as black boxes, but this issue highlights the danger of doing so. I suppose a language keyword is needed to specify when a non-temporary object is required as an actual parameter. Given that there's no such thing, perhaps it would be safer to eliminate such convenience constructors from the library?
I think that simplest thing to do would be to explain the problem in tokenizer documentation. B. PS. There is a chance that C++ will be enriched with syntax allowing to detect rvalue (temporary value) used as function parameter, see: http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1377.htm