[問題] VS2012 C++11 future的exception不太對勁
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
VC++ windows7
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
C++11 (VS2012)
問題(Question):
在VS2012裡,std::future throw出來的exception,
std::future_error的物件呼叫code()與what()回傳的值不相配。
餵入的資料(Input):
預期的正確結果(Expected Output):
理論上code()回傳enum的值,
應該與what()回傳訊息、字串相配。
錯誤結果(Wrong Output):
從測試結果來看,code()回傳的值是正確的,
但what()回傳的訊息是code()回傳的值在enum裡的下一個值。
程式碼(Code):(請善用置底文網頁, 記得排版)
http://ideone.com/ENym1k
補充說明(Supplement):
看起來像是VS2012的bug。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.62.94.138
→
04/27 17:13, , 1F
04/27 17:13, 1F
→
04/27 17:21, , 2F
04/27 17:21, 2F
→
04/27 17:23, , 3F
04/27 17:23, 3F
→
04/27 17:24, , 4F
04/27 17:24, 4F
→
04/27 17:26, , 5F
04/27 17:26, 5F
→
04/27 17:27, , 6F
04/27 17:27, 6F
→
04/27 17:27, , 7F
04/27 17:27, 7F
→
04/27 18:39, , 8F
04/27 18:39, 8F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章