[libcxx-commits] [PATCH] D95821: [docs] Explain noexcept policy for narrow contracts.
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 2 12:14:06 PST 2021
ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.
================
Comment at: libcxx/docs/UsingLibcxx.rst:352
+
+Extended applications of ``noexcept``
+------------------------------------------
----------------
I think this should move to `libcxx/docs/DesignDocs/<something>.rst`. You can then reference it (like the other design docs) from the main rst file.
================
Comment at: libcxx/docs/UsingLibcxx.rst:355
+
+As of version 14 libc++ will mark functions that do not throw (i.e.,
+"Throws: nothing" as ``noexcept``). This means that functions will not
----------------
zoecarver wrote:
> curdeius wrote:
> > zoecarver wrote:
> > > curdeius wrote:
> > > > Why not 13?
> > > Has the 13 release branch already been created? Even if it hasn't yet, almost all of the changes won't follow this "new" policy, so I think 14 makes more sense.
> > >
> > > If you'd still prefer I change it to 13, I'm happy to do that, though.
> > Release branch 12.x has been created a few days ago. So current main is version 13. It will be released in circa 6 months. I guess you thought it was one higher.
> Ah, I see, yes, I did think it was one higher.
Instead of wording this as "libc++ *will* mark functions that do not throw as `noexcept`", I think we should instead say something like: It is acceptable to mark functions that do not throw as `noexcept`. That way, we say that we are allowed to do it and we may use that right, but we don't *have* to. As worded currently, it sounds like people could file bugs against us for not following our own design policy to the letter. Do you see the distinction?
================
Comment at: libcxx/docs/UsingLibcxx.rst:356
+As of version 14 libc++ will mark functions that do not throw (i.e.,
+"Throws: nothing" as ``noexcept``). This means that functions will not
+report precondition violations by throwing and user-provided functions,
----------------
Mordante wrote:
> A bit pedantic, but it seems the Standard capitalizes Nothing.
I think your closing parens is not in the right place. I think you mean this instead:
> "Throws: Nothing") as `noexcept`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95821/new/
https://reviews.llvm.org/D95821
More information about the libcxx-commits
mailing list