Discussion Locked

Automate comparing to other types

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Tell us what you think about our C++ tip on overloading efficiently by automating comparing to other types, as featured in our Aug. 14 C++ newsletter.

2 replies

by john torjo

Hi Don,

To answer your question, yes, I did hear about templates, and the previous tips should have shown you that.

You are right, this solution does not work for templates. However, should it be implemented for templates, the code would look much more complicated, and there are many problems with different compiler vendors.

Having the EXTERNAL_OPERATOR_* macros in place, and with some good knowledge of templates, you should be able to implement them yourself.

Best,
John

This discussion is closed to new replies.