diff options
Diffstat (limited to 'clang-tools-extra/docs/clang-tidy/checks/misc-noexcept-move-constructor.rst')
| -rw-r--r-- | clang-tools-extra/docs/clang-tidy/checks/misc-noexcept-move-constructor.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/misc-noexcept-move-constructor.rst b/clang-tools-extra/docs/clang-tidy/checks/misc-noexcept-move-constructor.rst new file mode 100644 index 00000000000..9d6438fbca8 --- /dev/null +++ b/clang-tools-extra/docs/clang-tidy/checks/misc-noexcept-move-constructor.rst @@ -0,0 +1,11 @@ +misc-noexcept-move-constructor +============================== + + +The check flags user-defined move constructors and assignment operators not +marked with ``noexcept`` or marked with ``noexcept(expr)`` where ``expr`` +evaluates to ``false`` (but is not a ``false`` literal itself). + +Move constructors of all the types used with STL containers, for example, +need to be declared ``noexcept``. Otherwise STL will choose copy constructors +instead. The same is valid for move assignment operations. |

