LWG Issue 2056 - change the value of future_errc::broken_promise
mclow.lists at gmail.com
Fri Sep 13 22:51:37 PDT 2013
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.
Marshall Clow Idio Software <mailto:mclow.lists at gmail.com>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1906 bytes
Desc: not available
More information about the cfe-commits