"Alex Vinokur" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
[snip]
> Foo(5) is constant
Sorry, Foo(5) is not constant.
Here is an example.
-- foo.cpp --
#include
using namespace std;
struct Foo
{
int var_;
Foo(int var_i) : var_ (var_i) {}
= (const Foo &that) is applied, because
Foo(5) is constant
var1 = var2; // Foo& operator= (Foo &that) is applied
return 0;
}
-- foo.cpp : END
-- Compilation & Run : BEGIN --
$ gpp --version
gpp.exe (
oup/comp.lang.c++/browse_frm/thread/1a6f14442620c98e
http://www.groupsrv.com/computers/viewtopic.php?t=111003&sid=d321ba1cca3434d3354a918fccbd9ebb
--
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
> > > The reason for this failure seems to be that g++ treats temporary
> > > variables as consts. I see neither reason nor logic for this decision,
> > > however. Why can't I modify temporary variables if I so wish? Don't they
> > >
D-79865.news.uni-berlin.de
Perhaps it is not exactly what you are looking for, but maybe it might help you.
=====
Alex Vinokur
mailto:[EMAIL PROTECTED]
http://mathforum.org/library/view/10978.html
news://news
in the
/ proc give the answer i want to what function in the kernel code (probably in
fs/proc/proc_misc.c ) this commands calls to. thanks it would help me a
lot.
Look at
getrusage() :
http://www.die.net/doc/linux/man/man2/getrusage.2.html
========= Alex