Troubles with the rvalref changes to the *_heap functions
Chris Jefferson
chris@bubblescope.net
Tue Oct 9 09:07:00 GMT 2007
On 08/10/2007, Paolo Carlini <pcarlini@suse.de> wrote:
> Hi Chris, all,
>
> I'm now working on porting to mainline the changes to the *_heap
> algorithms and I'm having a lot of problems. Apparently something is
> wrong. The moveable.cc testcase (together with the obvious changes
> __gnu_cxx::__move -> std::move) fails immediately. Note that something
> seems strange in the testcase itself, for example:
>
> for(int i = 1; i < 9; ++i)
> {
> for(int z = 0; z < i; ++z)
> array[i] = i;
Yes, that certainly should be array[z] = z; The rest of that function
looks correct, although I haven't tested it yet.
While I'm very happy to be seeing rvalue references entering the
library and compiler, Unfortunately, at the moment I only have access
to a windows machine, where I have been unable to get a modern copy of
gcc to compile for quite some time.
The heap functions are indeed messy, I remember a number of them had
to take rvalue parameters, which look unpleasant. Fortunatly most of
the nastiness of these should simply be removable. I hope to have a
new computer in a couple of weeks, at which point if you haven't
finished the code I would be happy to have a look.
Chris
Chris
More information about the Libstdc++
mailing list