This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Relocation (= move+destroy)


On Sat, 13 Oct 2018 at 20:01, Marc Glisse <marc.glisse@inria.fr> wrote:

> In order to reduce the risk of bugs, my preference is
>
> 1) noexcept(auto): I am amazed that no compiler has implemented it yet,
> even as a private extension spelled __noexcept_auto or whatever, since it
> reduces significantly the burden on standard library developers. As a
> recent example, PR 87538 would never have had a chance to exist.
>
> 2) an exact copy-paste of the body of the function.
>
> 3) something else only if needed, for instance because 2) misses the
> conversion to the result type.
>
> Of course, since there is more chance *you* will have to maintain that
> mess, whatever style you find easier to maintain is more important.

(Removed gcc-patches, this is lib-only rumination). I drove
noexcept(auto) for a while.
I dropped it because the rationale for it was insufficient considering
the concerns
against it. I have entertained the idea of working on it on the
compiler side, but I
don't think there's a reason to raise the priority of such adventures,
considering
the apparently more important things to do. The evidence of the importance
of a noexcept(auto) is still lacking in my view, even if there's an
occasional library
bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]