17 Sep
2008
17 Sep
'08
12:29 p.m.
Robert Jones wrote:
Somewhere in the Boost headers, or maybe the Boost documentation I have seen a bit of code which uses SFINAE, and also possibly the enable_if header to select either a find class method or find global template depending on what's available.
That's compile-time detection of whether the object has some member function with a given signature or not. You can detect mostly everything but constructors and member-only operators, actually. It's too bad there isn't a Boost library to do just that. It's true that with concepts, though, it becomes less useful. There are probably bits in some places in Boost but I never knew where they were.