在已删除的运算符上指定noexcept是否有意义?

时间:2019-01-15 16:01:33

标签: c++ noexcept delete-keyword

例如,在上面指定noexcept是否有意义。删除的移动分配运算符?例如:

struct A
{
    A& operator=( A&& ) noexcept = delete;
};

如果我不指定它,我会写:

struct A
{
    A& operator=( A&& ) = delete;
};

0 个答案:

没有答案