LWG Issue 2056 - change the value of future_errc::broken_promise

Howard Hinnant howard.hinnant at gmail.com
Sat Sep 14 11:23:29 PDT 2013


On Sep 14, 2013, at 1:51 AM, Marshall Clow <mclow.lists at gmail.com> wrote:

> 
> On Sep 13, 2013, at 6:53 PM, Howard Hinnant <howard.hinnant at gmail.com> wrote:
> 
>> On Sep 12, 2013, at 1:50 PM, Marshall Clow <mclow.lists at gmail.com> wrote:
>> 
>>> Make it non-zero, like all the other error codes in the library.
>>> 
>>> Note: This changes both the dylib and the headers, and in a way that could break existing code
>>> (i.e, if you explicitly test for std:: future_errc::broken_promise, then you will need to recompile your code)
>>> 
>> 
>> On building:
>> 
>> + clang++ -c -g -Os -arch i386 -arch x86_64 -nostdinc++ -std=c++11 -fstrict-aliasing -Wall -Wextra -Wshadow -Wconversion -Wnewline-eof -Wpadded -Wmissing-prototypes -Wstrict-aliasing=2 -Wstrict-overflow=4 -I../include ../src/future.cpp
>> ../src/future.cpp:35:10: error: duplicate case value: '0' and 'broken_promise' both equal '0'
>>   case future_errc::broken_promise:
>>        ^
>> ../src/future.cpp:34:10: note: previous case defined here
>>   case future_errc(0):
>>        ^
>> 1 error generated.
>> 
>> Looks like the <future> synopsis is fixed, but not the actual code.
> 
> Yep, you're right - I must have run the wrong tests :-(
> Here's an updated patch; and I had to fix one of the tests, too.

Thanks, Committed revision 190756.

Howard





More information about the cfe-commits mailing list