GCC 5.2 と clang 3.6 を両方とも C++14 モードでテストしており、同じ出力が得られます。
次のコードの場合
#include <iostream>
#include <type_traits>
struct S {
// S& operator= (S&&) noexcept { return *this; }
};
int main() {
std::cout << std::is_nothrow_move_constructible<S>::value
<< std::is_nothrow_move_assignable<S>::value;
}
結果11
が得られます。ただし、移動代入演算子のコメントを外すと、出力は になり01
ます。noexcept
移動代入演算子の明示的な指定は、移動コンストラクターの指定にどのように影響する可能性がありますか?