[v3] libstdc++/33489

Benjamin Kosnik benjamin.kosnik@gmail.com
Mon Oct 8 15:42:00 GMT 2007


 
> This fix will not work in all cases.
> That's the major change for multiseq_selection.h:
> 
>     bool maxleftset = false, minrightset = false;
> -    T maxleft, minright;	// Impossible to avoid the warning?
> +    value_type maxleft(S(0)[a[0] - 1]);
> +    value_type minright(S(0)[b[0]]);
> 
> However, the referenced elements might not exist (a[0] == 0 or b[0]
> too large) in corner cases, even if all the sequences are non-empty.
> That's also the reason why the *set flags exist. We should use
> pointers instead. They could replace the *set flags as well (e. g.
> maxleft == NULL corresponds to maxleftset == false).

Ah ha! Thanks. I will try to do this today then.

> The other changes are minor and look OK.
> 
> > Seems like maybe std::vector could be used here...
> 
> Since we only refer to existing elements, we should be able to use
> pointers and/or references in all erroneous cases, in principle.

Ok. I'll start investigating solutions in this space.

best,
benjamin



More information about the Libstdc++ mailing list