"Justin M. Lewis" wrote:
> 
> I diagree with this.  The code I've written using this looks more like
> 
> void add_char( in_out<std::string> str, char ch)
> {
>   std::string &s = str;
>   s += ch;
> }

I think you're assuming everyone will code the way you want.  If you're
going to force everyone to code this way, why not just have them code
like:

  void add_char( std::string& str_, char ch_ )
  {
    str += ch;
  }

  int len( std::string const& str )
  {
    return str.length();
  }

What is the added value of the proposed class?  It's not that it forces
people to change the value if it's used:

  int len( in_out< std::string > str )
  {
    return static_cast< std::string& >( str ).length();
  }

Noel
-- 
NOTICE: If received in error, please destroy and notify sender.  Sender
does not waive confidentiality or privilege, and use is prohibited.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to