void q [[ noreturn ]] (int i) { // behavior is undefined if called with an argument <= 0
if (i > 0)
throw "positive";
}
...全文
2014打赏收藏
C++09:C大十八变,越变越难看
看看C++09的这种用法,我感觉又奇怪又丑陋 void f [[ noreturn ]] () { throw "error"; // OK } void q [[ noreturn ]] (int i) { // behavior is undefined if called with an argument 0) throw "positive"; }