Why should move constructors be marked noexcept?
- A It is required by the standard
- B std::vector only uses the move constructor during reallocation if it is noexcept
- C It makes the move faster
- D It prevents exceptions being thrown anywhere in the class
Answer
std::vector only uses the move constructor during reallocation if it is noexcept
Without noexcept, vector copies instead of moving in order to preserve the strong exception guarantee, silently losing the performance benefit.





