SFINAE std::result_of? Yeah, right!--Scott Prager

On the matter of having a useful error message:

SFINAE std::result_of? Yeah, right!

by Scott Prager

From the article:

Return type deduction pre-decltype and auto could really make one mad. Back then, if you wanted a function object, you had to make it "adaptable", meaning it had to inherit from std::unary_ or binary_function and define its first_argument_type, second_argument_type, and result_type. There had been no concept of "transparent functors" allowing us to pass polymorphic functions to higher order functions (like std::plus<> to std::accumulate). For an example of programming in these dark ages, check out the FC++ FAQ.

 

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.