|
From: Tom H. <to...@co...> - 2005-07-29 18:30:16
|
In message <200...@kf...>
Maurice van der Pot <gri...@ge...> wrote:
> On Fri, Jul 29, 2005 at 06:58:43PM +0100, Tom Hughes wrote:
> > > The build fails because of a few static const variable declarations
> > > within functions. Why are these static? If I change them to normal const
> > > variables, the compilation succeeds.
> >
> > The problem is not the fact that it is static, but the fact that
> > the initialiser is invalid.
>
> I'd like to understand this. The initialiser is False || somestaticconstfilevar.
> Why would that be a problem only for static consts and not for consts?
> What is the difference between static consts and consts within functions
> for that matter?
Whether it is const or not is irrelevant, the fact is that the
initialiser for a static variable (whether or not it is const and
whether it is at file or function scape) is supposed to be a constant.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|