If something is polymorphic, it has many shapes.
In computer science, polymorphism is a
programming language feature that
allows values of different data types
to be handled using a uniform
interface.
As this link explains, there are different types of polymorphism. Ad-hoc polymorphism is what we call it when an interface defines different implementations depending on a limited range of individually specified types and combinations. Function overloading and default parameters is a great example of this.
Universal polymorphism is split into parametric polymorphism (when an interface is type independent - templates is a good example of this) and inclusion polymorphism (when one data type can be treated as another, i.e. the typical OOP polymorphism where a derived class may be treated as a base class).
When it comes to the default function arguments in C++, the ad-hoc polymorphism is quite obvious. The universal polymorphism might come from the fact that you can use C++'s inclusion polymorphic features with the function arguments:
void a_function (const char* print_me, Car* pCar = NULL)
{
std::cout << print_me << std::endl;
if(pCar)
pCar->Drive();
}
Now, we could call the function like this:
a_function("Hello World!");
and it would simply print "Hello World!", or we can call it like this:
Car mycar;
a_function("Hello World!", &mycar);
and it would also drive the car. That is ad-hoc polymorphism. Due to C++'s inclusion polymorphism you can also do this:
class DieselTruck : public Car
{
// ...
};
and call it like this:
DieselTruck mytruck;
a_function("Hello Earth!", &mytruck);
and it would drive the truck (if the classes were correctly set up, of course - virtual functions and all that). So you can mix ad-hoc and universal polymorphism in functions that way. Whether this is what your professor is thinking about or not, I do not know. It is not directly connected to default arguments - i.e. you can do this perfectly fine without them, but then again, I can't see how you could accomplish universal polymorphism in C++ using only default arguments.