|
Boost : |
From: John Torjo (john_at_[hidden])
Date: 2003-04-24 07:20:58
> void f( in_out< int > is_not_changed_ )
> {
> // use is_not_changed_, but don't change it
> }
I think there would be a much bigger problem (code inside the function would
change).
Just consider
void add_char( std::string & str, char ch)
{ str += ch; }
Now, if we change it so be in_out, we'll have to use a .ref()-like function.
void add_char( in_out<std::string> str, char ch)
{ str.ref() += ch; }
Of course, this is a simple example, but it illustrates the point.
The code would become obfuscated.
Frankly, I donot like it.
Best,
John
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk