
13 Apr
2008
13 Apr
'08
11:43 a.m.
On Sun, 2008-04-13 at 12:51 +0200, Daniel Frey wrote:
The new version (attached) has only 4 overloads instead of N, but it still uses typeof.
OK, another version. No typeof and O(1), due to the fact that in the good case the common_type_helper must always be instantiated with the same T, so the number of template instantiations doesn't grow, it has a constant limit. The bad case will fail anyway, but it might need some instantiations before finding out. I hope that this solution is acceptable for you. Regards, Daniel