/c++/v1/numeric:554:52: error: arithmetic on pointers to the function type 'int ()'
return __a + _VSTD::midpoint(ptrdiff_t(0), __b - __a);
~~~ ^ ~~~
According to N4810, std::midpoint for T* should be constrained to require T to be a complete object type (not a function type, and not cv void either).
I'm fairly confident that no library code should ever try to constrain on is_pointer without also asking whether it's an object pointer, function pointer, member pointer, or void pointer. It might be worth auditing the entire libc++ codebase for uses of is_pointer.
The text was updated successfully, but these errors were encountered: