Compile time programming provides the features through which some of the code is evaluated at compile time. Constant expressions are such features. There are several advantages of compile time programming such as making program performant by evaluation constant expressions so that they won’t need to be repeatedly evaluated at run time, making program smaller by replacing piece of code by evaluating them, some of the errors can be found at the compilation time, etc.