Static constant class members
Vova
vova-gs@yandex.ru
Sun Feb 29 20:39:00 GMT 2004
Hello !
On Sunday 29 February 2004 19:49, Eljay Love-Jensen wrote:
> You are correct. If you really want it to be an immediate operand in C++,
> do this:
>
> class TxtVideo
> {
> public:
> static unsigned int* const getVBase() { return (unsigned int*
> const)0x0C00B8000L; }
> ...
>
> That will be inserted as an inline function (since it's body is defined in
> the class), and the inline will optimize down to an immediate.
>
Thanks ! I'll try it.
--
Vova
More information about the Gcc-help
mailing list