[PATCH] C++11: noexcept should check whether the expression is a constant expression

Ismail Pazarbasi ismail.pazarbasi at gmail.com
Mon Mar 25 16:21:18 PDT 2013


  I have read the resolution for the issue 1351, and I was curious about aligning this with the removal of dynamic exception specifications as well. Could you please confirm whether I understood this part correctly; given the example in issue 1351, in the move constructor declaration, "noexcept" is represented with an empty set:
  `B(B&&, int = (throw Y(), 0)) throw(Y) noexcept;`
  The union of set of potential exceptions is: {Y} U {Y} U {} = {Y};
  Likewise, if it was:
  `B(B&&, int = (throw Y(), 0)) throw(Z) noexcept;`
  The union of set of potential exceptions: {Y} U {Z} U {} = {Y, Z}

  Could you please explain the purpose of having throw(E) and noexcept on the same declarator? I understand throw(E) and noexcept(false) would be compatible.

http://llvm-reviews.chandlerc.com/D538



More information about the cfe-commits mailing list