[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: operator< for caseless_str
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: operator< for caseless_str |
Date: |
Sat, 14 May 2011 23:51:15 -0500 |
2011/5/14 Michael Goffioul <address@hidden>:
> 2011/5/14 Jordi Gutiérrez Hermoso <address@hidden>:
>> Yes, looks like 68a59630798d broke something in stable. I just managed
>> to successfully compile 2c54fde0f397. The following two lines appear
>> to be what breaks in 68a59630798d:
>>
>> set (0, "defaultfigurepapertype", "<custom>");
>> f = figure (1);
>>
>> After some printf debugging, I managed to conclude that the algorithm
>> in op< implemented therein is buggy. Look:
>>
>> http://codepad.org/aQsNx53a
>>
>> Clearly "queue" and "cancel" are not both greater than equal to each
>> other lexicographically. Since this is happening, std::set concludes
>> tha the two are the same so only inserts the first one of them into
>> the set, which results in certain property values being taken as
>> invalid, as the above error shows.
>>
>> Sadly, whatever state of mind David Bateman was in when he wrote this
>> is the same one I'm in right now, because I can't see the bug.
>
> I think the algorithm is not correct. It compares every characters
> of t and s and returns false whenever one character of s is <
> of the one in t.
Yeah, I don't know why it took me a while to note that. I pushed this
change, which fixes the build for me:
http://hg.savannah.gnu.org/hgweb/octave/rev/2c96207d0e06
- Jordi G. H.