Cevelop / cevelop

The C++ IDE for professional developers
Eclipse Public License 2.0
5 stars 0 forks source link

GSLAtor: core guidelines checker ES.66 move operations should be noexcept #14

Open PeterSommerlad opened 6 years ago

PeterSommerlad commented 6 years ago

Expected Behavior

when move operations are specified with conditional noexcept this rule triggers. Since such conditions often are quite complex traits with nested noexcept operations the checker looks ugly

e.g:

    unique_resource &operator=(unique_resource &&that)
        noexcept(is_nothrow_delete_v &&
                 std::is_nothrow_move_assignable<R>::value &&
                 std::is_nothrow_move_assignable<D>::value)
    {

Actual Behavior

if a conditional noexcept is encountered that is not noexcept(false) the checker should be silenceable by configuration, so still blame when there is no noexcept after a move operation, but not blaming in cases above without adding an attribute (which does not change code correctly at the moment anyway).

Needs to be discussed, may be an attribute is what we want here.

Cevelop Version, Operating System and Compiler

current