compile time is the term used for:
- the time it takes to compile. Techniques to
shorten this are:
- use of forward declarations
- use of pimpl idiom
- use of precompiled header files
- properties known when compiling. For example, the factorial of any (compile time) constant is known. Template metaprogramming shifts the runtime calculations to compile time
What can be checked at compile time is usually best checked at compile time, for example by using static_assert.
compile time is followed by link time.
-
- Bjarne Stroustrup. The C++ Programming Language (4th edition). 2013. ISBN: 978-0-321-56384-2. Chapter 13.7. Advice. page 387: '[21] What can be checked at compile time is usually best checked at compile time (using static_assert)'