| 1 |
.. title:: clang-tidy - performance-noexcept-move-constructor |
| 2 |
|
| 3 |
performance-noexcept-move-constructor |
| 4 |
===================================== |
| 5 |
|
| 6 |
|
| 7 |
The check flags user-defined move constructors and assignment operators not |
| 8 |
marked with ``noexcept`` or marked with ``noexcept(expr)`` where ``expr`` |
| 9 |
evaluates to ``false`` (but is not a ``false`` literal itself). |
| 10 |
|
| 11 |
Move constructors of all the types used with STL containers, for example, |
| 12 |
need to be declared ``noexcept``. Otherwise STL will choose copy constructors |
| 13 |
instead. The same is valid for move assignment operations. |