[Bug 279443] LIBCPP assertions are enabled in optimized builds when -DNDEBUG is given to clang

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 01 Jun 2024 03:40:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279443

Paul Floyd <pjfloyd@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pjfloyd@wanadoo.fr

--- Comment #7 from Paul Floyd <pjfloyd@wanadoo.fr> ---
(In reply to Mark Millard from comment #1)

Why not write it in clean C++ style rather than taking pointers in crappy UB C
style?

std::copy(
                std::begin(buf),
                std::end(buf),
                std::back_inserter(r)
            );

That way you don’t need to cross your fingers and hope that the compiler does
what you imagined it should do.

-- 
You are receiving this mail because:
You are the assignee for the bug.