https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962
Barry Revzin <barry.revzin at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |barry.revzin at gmail dot com
--- Comment #12 from Barry Revzin <barry.revzin at gmail dot com> ---
Similar failure:
struct A {
void f();
};
int main() {
constexpr auto pmf = &A::f;
static_assert(pmf != nullptr); // error with UBSAN only
}
This surfaces from attempting to implement function_ref
(https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p0792r14.html) which
has a constructor that takes the callable as a non-type template parameter and
static_asserts that it's not a null pointer.
Which apparently doesn't work with UBSAN.