std:vec for classes with constructor? (Was: Re: [patch] multi-range implementation for value_range (irange))

Richard Biener
Wed Aug 5 16:54:08 GMT 2020

On August 5, 2020 5:09:19 PM GMT+02:00, Martin Jambor <> wrote:
>On Fri, Jul 31 2020, Aldy Hernandez via Gcc-patches wrote:
>> * ipa-cp changes from vec<value_range> to std::vec<value_range>.
>> We are using std::vec to ensure constructors are run, which they
>> in our internal vec<> implementation.  Although we usually steer away
>> from using std::vec because of interactions with our GC system, 
>> ipcp_param_lattices is only live within the pass and allocated with
>Ummm... I did not object but I will save the URL of this message in the
>archive so that I can waive it in front of anyone complaining why I
>don't use our internal vec's in IPA data structures.
>But it actually raises a broader question: was this supposed to be an
>exception, allowed only not to complicate the irange patch further, or
>will this be generally accepted thing to do when someone wants to have
>vector of constructed items?

It's definitely not what we want. You have to find another solution to this problem. 



More information about the Gcc-patches mailing list