On Sat, Nov 6, 2010 at 7:47 PM, ZdenÄk Sojka <zsojka@xxxxxxxxx> wrote: > >> The compiler is right: the value of `x' cannot fit in an int, therefore the >> declaration is ill-formed. ÂThis has nothing to do with constexpr. > > (-1) isn't representible in unsigned as well, but I suppose I should read the c++0x "standard" then, thanks :) That is a common misconception: (-1) is a perfectly valid unsigned int value, it is the maximum value of type unsigned int. That is precisely why it cannot be represented by int and why the compiler is yelling. Don't allow yourself to be confused by the syntax. -- Gaby