22 September 2008

What the functor?

Today I did the most advanced C++ programming that I've ever done. It's a recursively templated function that checks for soft equivalence of two doubles, or two vectors of doubles, or two vectors of vectors of doubles, or so on and so on.

This evening, I took that design and added functors to it, so that it can do any arbitrary comparison. I'd just read about them yesterday and gone, "Huh. What kind of weird application could those have?"

0 comments:

Post a Comment