>>7
Can't this be done in the preprocessor to eliminate runtime overhead?
Better question: does any compiler precalculate static functions called with compile-time known values? I know some of them do it for some specific functions (mostly math stuff), but I wonder if it's more spread.