General discussion

Locked

Automate comparing to other types

By debate ·
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.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

What do I think? Not much!

by don.macdonald In reply to Automate comparing to oth ...

Ever hear of templates?

Collapse -

Yes I did

by John Torjo In reply to What do I think? Not muc ...

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

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums