2

How many polymorphism types does C++ have? Can Macro polymorphism be considered as one polymorphism type in C++?

lojunren
  • 139
  • 1
  • 9

1 Answers1

0

The definition of polymorphism from Wikipedia:

In programming languages and type theory, polymorphism (from Greek πολύς, polys, "many, much" and μορφή, morphē, "form, shape") is the provision of a single interface to entities of different types.

In that sense, it makes sense to think of generic functions/operators that one can create using C preprocessor macros as a form of polymorphism.

R Sahu
  • 204,454
  • 14
  • 159
  • 270