|
Boost : |
From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2004-04-16 10:07:33
"Mårten Rånge" <marten.range_at_[hidden]> wrote in message
news:20040415161750.1D99437E66_at_smtp2-2-sn4.m-sp.skanova.net...
[snip]
>As I'm sure you all are aware of in C# when you specify a function like
this
>
>void do_stuff(ref int i)
>{
>++i;
>}
>
>You have to call it like this:
>
>int l_i = 4233;
>do_stuff(ref l_i);
>
>You see at the place the call is made that l_i might be modified by
>do_stuff. I would love to have that in C++. Could you design the arguments
>of a function so that the compiler requires you to write something like
>this?
perhaps if operator.() could be overloaded. You could use a pointer instead.
br
Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk