Re: [eigen] [patch] Missing function in StdVector

[ Thread Index | Date Index | More Archives ]

On Wed, May 6, 2009 at 5:19 PM, Hauke Heibel
<hauke.heibel@xxxxxxxxxxxxxx> wrote:
> On Wed, May 6, 2009 at 3:44 PM, Gael Guennebaud
> <gael.guennebaud@xxxxxxxxx> wrote:
>> actually I think a better fix would be:
>> using vector_base::insert;
> I just tried it and it works but seems a little bit mysterious to mee.

there is no magic. This simply tells the compiler to also look at the
base class for overloaded versions of insert. Then, as usual with C++,
the most specific overload is used.

> You have to write exactly what you suggested and what irritates me is
> how the compiler decides which of the three implementations from
> std::vector he is going to use. He is not using all of them and since
> no signature is defined the compiler choice occurs to me like 'dark
> magic' and I would suggest to stick to the initial approach - it just
> seems to be more clear what is happening.
> I also registered some more errors in the interface and attached
> another patch - these were just signature errors (const correctness &
> return values).
> Hauke

Mail converted by MHonArc 2.6.19+