The 'functions' from above relies on the compiler's ability to evaluate constant expressions, see §C.5 in The C++ Prog. Lang. (3. edition)