C++11 user-defined literals

Marc Glisse marc.glisse at inria.fr
Mon Mar 5 21:23:58 CET 2012


Hello,

in C++11, we could make it so that writing 2_mpz or "-123/17"_mpq would be 
equivalent to mpz_class(2) or mpq_class("-123/17"). Does that seem useful 
to anyone? If it does, what suffix do you think would be best (like _mpz 
and _mpq in my example, with the constraint that it has to start with an 
underscore)?

My current opinion is that the benefits are small enough that it will 
wait.

-- 
Marc Glisse


More information about the gmp-discuss mailing list