But if the assertion fails, the program is aborted before the pointer would have been dereferenced, making it not UB. This explanation is bogus.
Only if the assert is active. It basically means that the code is invalid when NDEBUG is set.
Only if the assert is active. It basically means that the code is invalid when NDEBUG is set.