It doesn't really give a rationale, but here's what Stroustrup has to say about this in "The C++ Programming Language Third Edition":
10.4.6.2 Member Constants
It is also possible to initialize a
static integral constant member by
adding a constant-expression
initializer to its member declaration.
For example:
class Curious {
static const int c1 = 7; // ok, but remember definition
static int c2 = 11; // error: not const
const int c3 = 13; // error: not static
static const int c4 = f(17); // error: in-class initializer not constant
static const float c5 = 7.0; // error: in-class not integral
// ...
};
However, an initialized member must still be (uniquely) defined
somewhere, and the initializer may not
be repeated:
const int Curious::c1; // necessary, but don't repeat initializer here
I consider this a misfeature. When you need a symbolic constant
within a class declaration, use an
enumerator (4.8, 14.4.6, 15.3). For
example:
class X {
enum { c1 = 7, c2 = 11, c3 = 13, c4 = 17 };
// ...
};
In that way, no member definition is needed elsewhere, and you are not
tempted to declare variables,
floating-point numbers, etc.
And in Appendix C (Technicalities) in Section C.5 (Constant Expressions), Stroustrup has this to say about "constant expressions":
In places such as array bounds (5.2), case labels (6.3.2),
and initializers for enumerators (4.8), C++ requires a
constant expression. A constant expression evaluates to
an integral or enumeration constant. Such an expression
is composed of literals (4.3.1, 4.4.1, 4.5.1),
enumerators (4.8), and consts initialized by
constant expressions. In a template, an integer template
parameter can also be used (C.13.3). Floating literals (4.5.1)
can be used only if explicitly converted to an integral
type. Functions, class objects, pointers, and references
can be used as operands to the sizeof
operator (6.2) only.
Intuitively, constant expressions are simple expressions
that can be evaluated by the compiler before the program
is linked (9.1) and starts to run.
Note that he pretty much leaves out floating point as being able to play in 'constant expressions'. I suspect that floating point was left out of these types of constant expressions simply because they are not 'simple' enough.