Avoid unnecessary reference-count thrashing
Merge pull request #27 from jwakely/patch-1

Avoid unnecessary reference-count thrashing
Improvement to DoNotOptimizeAway

This improves the performance of DoNotOptimizeAway and adds a special template overload for objects convertible to std::function.  If a std::function is used, the function will be called before optimization is interrupted.