help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to make a static function a friend of a class


From: Larry I Smith
Subject: Re: how to make a static function a friend of a class
Date: Mon, 16 May 2005 17:29:38 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050414

Maett wrote:
[snip]

But I would like foo1 to be static to avoid it being a global symbol.
(I have a tool which generates c++ code out of data structure definitions, and there are quite a few such definitions, which would lead to manymany global symbols.

[snip]

This entire discussion is off-topic here, since it is
not a g++ issue.

Post additional messages on this topic to the
comp.lang.c++  newsgroup.

Does your 'tool' make all of the struct data members 'static'?
That would prevent you from having multiple copies of
a given structure that actually does anything useful - since
all of the copies would be refering to the same data items
(e.g. 5 different instances of foo1Class will all be accessing
and updating the single foo1Class::n).

Regards,
Larry

--
Anti-spam address, change each 'X' to '.' to reply directly.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]