Web Development

General discussion


Automate comparison operators

By Mark W. Kaelin Editor ·
Tell us what you think about our C++ tip on automating comparison operators.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Prefer Templates to Macros

by kevlin In reply to Automate comparison opera ...

There are template techniques that offer a far cleaner approach to generating comparison operators, e.g.

class Name : public AllComparisons<Name>

I am not sure that I want MFC-style macros littering my code! Or rather, I am quite sure that I don't :->


Related Discussions

Related Forums