Advertisement
yumetodo

constant_expression

Jul 18th, 2016
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. 2. A conditional-expression e is a core constant expression unless the evaluation of e, following the rules of the abstract machine (1.9), would evaluate one of the following expressions:
  2. 2.7. an lvalue-to-rvalue conversion (4.1) unless it is applied to
  3. 2.7.1 a non-volatile glvalue of integral or enumeration type that refers to a complete non-volatile const object with a preceding initialization, initialized with a constant expression, or
  4.  
  5. http://ezoeryou.github.io/cpp-book/C++11-Syntax-and-Feature.xhtml#expr.const
  6.  
  7. ある式eを評価した際に、以下に挙げる式を評価しない場合、式eはコア定数式(core constant expression)である。
  8. lvalueからrvalueへの変換、ただし以下の場合を除く
  9. 非volatileのglvalueの整数かenumの型が、初期化前か定数式による初期化後の非volatileのconstオブジェクトを参照する場合
  10.  
  11. 文字列リテラルによる配列が該当する
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement