Since GMP numbers are not directly assignable (in other words, you can't do mpz_t test = 0;' or
mpz_t test1l; test1 = test;`, I don't believe they can be used in standard C++ container types.
If you want to do that, you may want to use the C++ interface for GMP instead: https://gmplib.org/manual/C_002b_002b-Interface-General.html