This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Troubles with the rvalref changes to the *_heap functions
- From: "Chris Jefferson" <chris at bubblescope dot net>
- To: "Paolo Carlini" <pcarlini at suse dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 9 Oct 2007 10:07:41 +0100
- Subject: Re: Troubles with the rvalref changes to the *_heap functions
- References: <470A7847.7050804@suse.de>
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