C++11- Move constructor requires “noexcept”

less than 1 minute read

If a class having move constructor needs to be in the container class, it should have "noexcept" qualification. If move constructor may throw exceptions, it will try to use copy constructor instead of move constructor.

1
2
3
4
5
6
class Manager
{
   ...
   Manager(Manager&& other) noexcept;
   ...
}