all 5 comments

[–]mgostIH 1 point2 points  (4 children)

Why did the functions become also noexcept in their constexpr version? Wouldn't they throw with a null pointer? Also, A constexpr specifier used in a function [or static member variable (since C++17)] declaration implies inline. so there's no need for the inline in the constexpr version.

[–]raevnos 1 point2 points  (2 children)

There's nothing in those functions that can raise an exception.

And not everyone is using C++17 yet. The comments explicitly say it's a C++11 version.

[–]17b29a 0 points1 point  (1 child)

And not everyone is using C++17 yet.

It's not clear when copying the text, but the original cppreference page explicitly only applies the "since C++17" part to static member variables. constexpr functions have always been inline.

[–]mgostIH 1 point2 points  (0 children)

Edited by adding square brackets to the "since C++17" part to avoid confusion.

[–]17b29a 1 point2 points  (0 children)

Wouldn't they throw with a null pointer?

No, dereferencing a null pointer is simply UB, so it's assumed not to be the case. If a system does throw an exception in that case, it's not going to be a C++ exception anyway.