haberg-1 at telia.com
Sun Oct 2 20:32:33 CEST 2011
On 2 Oct 2011, at 20:07, Gabriel Dos Reis wrote:
>>>>> Just on the off chance that you are suggesting dropping expression templates and relying on copy elision and/or rvalue references to reduce the number of temporaries:
>>>> Yes, but there would still be a template for the memory allocation.
>>> I am sorry, I still don't understand what you are suggesting. What template are you talking about? Do you mean to implement integers of fixed size? Or is the template something like std::allocator?
> Like Marc, I am having difficulty following your suggestions. There
> were three questions
> in the paragraph to which you replied "Right". Please, elaborate.
The allocator template model probably does not work with GMP, as it sets those globally.
So the idea is to write "class integer" etc. using C++11 move copy & assignment operators to avoid copying of temporaries.
More information about the gmp-discuss