From: Vova <vova-gs@yandex.ru>
To: gcc-help@gcc.gnu.org
Subject: Static constant class members
Date: Sat, 28 Feb 2004 18:41:00 -0000 [thread overview]
Message-ID: <200402282117.03580.vova-gs@yandex.ru> (raw)
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.
next reply other threads:[~2004-02-28 18:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 18:41 Vova [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200402282117.03580.vova-gs@yandex.ru \
--to=vova-gs@yandex.ru \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).