Polymorphic behavior resolved by compiler before program runs.
- Function overloading
- Operator overloading
- Templates
Printer::print(...)demonstrates overloadingadd<T>(...)demonstrates template-based polymorphism
"Compile-time polymorphism gives fast, type-safe behavior selection using overloads and templates without runtime virtual dispatch."