public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Static constant class members
@ 2004-02-28 18:41 Vova
  2004-02-28 21:23 ` Eljay Love-Jensen
  0 siblings, 1 reply; 5+ messages in thread
From: Vova @ 2004-02-28 18:41 UTC (permalink / raw)
  To: gcc-help

Hello all !
I have problem with this construction:

class TxtVideo {
  protected:
	static unsigned int* const VBASE = (unsigned int*) 0x0c00b8000L;

When compiling it I'm getting error message:
error: invalid in-class initialization of
   static data member of non-integral type `unsigned int* const'

I want to define this constant in header file becouse compiler must be able to 
insert it as imidiatly operand, like #define constants.
I can define it as integral type such as int, but thet I must always use 
reinterpret_cast<unsigned int*>. This is bad solution.

I discover, that this error appear only in g++ >= 3.0, in 2.9* it was all 
right.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-02-29 18:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-28 18:41 Static constant class members Vova
2004-02-28 21:23 ` Eljay Love-Jensen
2004-02-29 16:49   ` Vova
2004-02-29 17:13     ` Eljay Love-Jensen
2004-02-29 20:39       ` Vova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).