Topic: default args in template functions
Author: sdm@cs.brown.edu (Scott Meyers)
Date: 27 Jan 92 18:45:13 GMT Raw View
cfront 3.0 says:
"sets.h", line 43: error: function templates do not support
default arguments
I looked in the ARM and I quickly scanned the latest Lippman and
Stroustrup, but I saw no such restriction. Can it really be true that
template functions can't have default arguments? If so, why?
Here's the offending code:
template <class T>
class Multiset {
void zap(const long elementID, const Boolean zapAll = TRUE);
};
Scott
-------------------------------------------------------------------------------
What do you say to a convicted felon in Providence? "Hello, Mr. Mayor."