2016년 독서 목록

Random Translation 1

출처: http://articles.emptycrate.com/2016/05/14/folds_in_cpp11_ish.html다음은 최종 C++11 표준에 가장 가깝다고 할 수 있는 초안을 인용한 것이다.5.18 콤마 연산자 [expr.comma] 콤마 연산자는 왼쪽에서 오른쪽 순으로 연결한다.expression:assignment-expressionexpression , assignment-expression콤마 연산자로 이어지는 두 표현식 중 왼쪽이 먼저 계산된다. 왼쪽 연산 결과는 버린다. 왼쪽 표현식 연산 과정에서 발생하는 모든 효과는 오른쪽 표현식 연산 과정이 일어나기 전에 순서대로 발생한다. 결과로 반환하는 형식과 값은 오른쪽 표현식에서 온다. 그 결과는 오른쪽 표현식과 똑같은 형식(lvalue, rvalue reference 등)이다. 오른쪽 표현식 결과가 glvalue이고 비트 필드이면 결과도 비트 필드가 된다.원문These quotes are from n3337, which is (according to wikipedia) the draft standard closest to what the final published C++11 standard says.5.18 Comma operator [expr.comma] The comma operator groups left-to-right.expression:assignment-expressionexpression , assignment-expressionA pair of expressions separated by a comma is evaluated left-to-right; the left expression is a discarded- value expression (Clause 5). 83 Every value computation and side effect associated with the left expression is sequenced before every value computation and side effect associated with the right expression. The type and value of the result are the type and value of the right operand; the result is of the same value category as its right operand, and is a bit-field if its right operand is a glvalue and a bit-field.

  • 2016/05/31 23:24 에 작성

results matching ""

    No results matching ""