[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gmp-discuss
Subject:    C++11
From:       cafealpha2 () gmail ! com (Cafe Alpha2)
Date:       2011-10-02 19:11:09
Message-ID: CACkvUKahuqH2f70=2Mh-2Pm4_2a3q4vkTvu4KT5nXRa8KkXkhA () mail ! gmail ! com
[Download RAW message or body]

Warning microsoft visual studio 2010 allows c++0x syntax but doesn't
actually compile the rvalue code. From my tests it looks like it still calls
the lvalue code and makes unnecessary copies.
On Oct 2, 2011 11:32 AM, "Hans Aberg" <haberg-1 at telia.com> wrote:
> 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?
>>>
>>> Right.
>>
>> 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.
>
> Hans
>
>
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic