On the matter of having a useful error message:
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
binary_functionand define its
result_type. There had been no concept of "transparent functors" allowing us to pass polymorphic functions to higher order functions (like
std::accumulate). For an example of programming in these dark ages, check out the FC++ FAQ.