5 Comments

Any chance that the header file import statement should be ‘ #include <limits>’ instead?

Expand full comment

Good spot.

The example should have also included <limits> (that is needed for std::numeric_limits). std::midpoint comes from <numeric> which includes <limits>. This is why it works.

Technically it would break with modules, however, with modules we would #import std; and don't think about singular headers anyway. 🤷

Expand full comment

Ahh, good to know. I was wondering why it still works.

Thanks for the tidbit!

Expand full comment

"How hard could it be? "

Expand full comment

😅

Expand full comment