5

I understand containers can optimize for types having noexcept move constructor / assignment / swap. But are there practical reasons (aside documentation) for specifying other operations as noexcept?

Specifically, I'm interested if there are optimizations in the standard library to be gained by additionally having noexcept:

  1. Default constructor
  2. Copy constructor
  3. Copy assignment
4

0 回答 0