runtime error: load of value 4294967293, which is not a valid value for type 'const lyx::Update::flags'

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sun Jan 23 18:59:31 UTC 2022


Le 23/01/2022 à 19:41, Kornel Benko a écrit :
> Am Sun, 23 Jan 2022 17:35:30 +0100
> schrieb Jean-Marc Lasgouttes <lasgouttes at lyx.org>:
> 
>> Le 23/01/2022 à 10:43, Kornel Benko a écrit :
>>> Here 2 possible patches which do not show the behaviour.
>>> (I prefer the number 2)
>>
>> Number 2 is indeed the best as a short term solution.
>>
>> However the real issueis that this game with specialized operators is a
>> bit stupid: the result of or-ing two enum elements is not an enum
>> element. The combination of enum flags should be stored in an int like
>> Qt does (or a fancy template-based solution).
> 
> Using std::bitset<5> instead comes also in mind.
> Some struggle while adding here expected though.
> 
>> Besides the fact that we try to shoehorn it into an enum, the
>> computation highlighted above is perfectly OK.
>>
>> JMarc
> 
> So, OK to commit?

Yes. And one day I will simplify this by using plain ints.

JMarc


More information about the lyx-devel mailing list