https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105810

--- Comment #6 from cqwrteur <unlvsur at live dot com> ---
(In reply to Jonathan Wakely from comment #5)
> (In reply to cqwrteur from comment #4)
> > btw since the function is inline linkaged, the entire program would only
> > contain one copy of __my_glibcxx_constexpr_assert<T>. For example for
> > std::span::operator[] the entire program shares the bounds checking part.
> 
> Isn't that already true today? span::operator[] is inline too, so there's
> only one copy of that, and no copies of __my_glibcxx_constexpr_assert<T> at
> all.
> 
> You're adding lots of new symbols to the object files, which must be merged
> by the linker. The difference is that setting up the arguments to
> __glibcxx_assert_fail is in the new function, not in span::operator[].

i mean the __my_glibcxx_constexpr_assert<T> part would be merged.

Reply via email to