Topic: static const member initialising
Author: Mike Hewson <hewsmike@optusnet.com.au>
Date: Wed, 5 Jan 2005 12:02:58 CST Raw View
From comp.lang.c++ a question arose regarding initialising a static
constant non-integral type within a class scope ie.
class ABC
{
static const float some_float = 3.3f;
};
is not OK, whereas:
class ABC
{
static const int some_int = 3;
};
is OK, being integral.
( ISO/IEC 14882 9.4.2 was discussed )
What is the rationale for this?
--
Cheers
--
Hewson::Mike
"This letter is longer than usual because I lack the time to make it
shorter" - Blaise Pascal
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]