[libcxx-commits] [PATCH] D95821: [docs] Explain noexcept policy for narrow contracts.

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 5 11:27:54 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfab194898b5e: [lic++][docs] Explain noexcept policy for narrow contracts. (authored by zoecarver).

Changed prior to commit:
  https://reviews.llvm.org/D95821?vs=320938&id=321838#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95821/new/

https://reviews.llvm.org/D95821

Files:
  libcxx/docs/DesignDocs/NoexceptPolicy.rst
  libcxx/docs/index.rst


Index: libcxx/docs/index.rst
===================================================================
--- libcxx/docs/index.rst
+++ libcxx/docs/index.rst
@@ -173,6 +173,7 @@
    DesignDocs/FeatureTestMacros
    DesignDocs/ExtendedCXX03Support
    DesignDocs/UniquePtrTrivialAbi
+   DesignDocs/NoexceptPolicy
 
 * `<atomic> design <http://libcxx.llvm.org/atomic_design.html>`_
 * `<type_traits> design <http://libcxx.llvm.org/type_traits_design.html>`_
Index: libcxx/docs/DesignDocs/NoexceptPolicy.rst
===================================================================
--- /dev/null
+++ libcxx/docs/DesignDocs/NoexceptPolicy.rst
@@ -0,0 +1,13 @@
+====================
+``noexcept`` Policy
+====================
+
+Extended applications of ``noexcept``
+------------------------------------------
+
+As of version 13 libc++ may mark functions that do not throw (i.e.,
+"Throws: Nothing") as ``noexcept``. This has two primary consequences:
+first, functions might not report precondition violations by throwing.
+Second, user-provided functions, such as custom predicates or custom
+traits, which throw might not be propagated up to the caller (unless
+specified otherwise by the Standard).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95821.321838.patch
Type: text/x-patch
Size: 1185 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210205/b0111ffc/attachment.bin>


More information about the libcxx-commits mailing list