Move which throws?

后端 未结 3 914
既然无缘
既然无缘 2021-01-05 07:55

To my understanding, move-constructors and move-assign must be marked noexcept in order for the compiler to utilize them when, for example, reallocating inside a vector.

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-05 08:48

    Move constructors on classes with const data members can also throw. Check here for more info.

提交回复
热议问题