FYI, if one follows the GMP API, it forces C++11 move constructors to make a heap allocation via mpz_init, which then is immediately destroyed using mpz_clear. The reason is that the API does not guarantee that nothing happens if the pointer is set to NULL even if one uses a deallocator, like 'free', with that property.