Size of enum‏

2012-02-05 Thread Alexandre Almeida
What do you think about making enum types have only the size needed for the number of constants held? If an enum type has 256 constants or less, for example, it needs only one byte. If it has between 257 and 65536 constants, in the other hand, it needs two bytes.

RE: Size of enum‏

2012-02-06 Thread Alexandre Almeida
Okay, I am sorry for not knowing that there is an option to make enum types as short as possible. Anyway, I think it should be a default option. Do you agree?

Problem with inline member functions

2012-02-07 Thread Alexandre Almeida
It seems to be impossible to define an inline member function externally with GCC. When attempting to do so, the linker returns an error. Here is how I attempted to do it: Header file: - class C { public:     void foo(); }; CPP file: - inline void C::foo() {     [..