On Mon, Aug 19, 2013 at 11:40 AM, Matt Calabrese
The first point is only true in the old implementation -- the one in the sandbox ditches the function type trick entirely and just directly instantiates an enable_if-style template. Right now, the template used inherits from boost::enable_if, but that inheritance can be eliminated if the additional instantiation implied by the base offends you. That would make the amount of instantiations exactly the same as a traditional enable_if approach Can you elaborate on your third point? What additional step are you talking about and show that it actually impacts compile-time. It's certainly possible that this approach has a compile-time impact over directly using enable_if, though I've used it extensively for over a year and haven't noticed. I haven't made a big, brute-force test for compile-time performance, but from the looks of it neither have you.
I've just eliminated the additional instantiations and committed the changes. If you want to test compile-time performance, do it based on that. Instantiations should be minimal now unless I missed something. -- -Matt Calabrese