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_orbinary_functionand define itsfirst_argument_type,second_argument_type, andresult_type. There had been no concept of "transparent functors" allowing us to pass polymorphic functions to higher order functions (likestd::plus<>tostd::accumulate). For an example of programming in these dark ages, check out the FC++ FAQ.

Add a Comment
Comments are closed.