美文网首页
ISO/IEC 14882 2017 5edition个人翻译

ISO/IEC 14882 2017 5edition个人翻译

作者: KinoluKaslana | 来源:发表于2018-08-19 17:03 被阅读0次

    写在开头:
    这个系列的翻译会不定时跟进,因为是为了找出Cpperference中没有看懂的地方而做的标准翻译,不会一次性翻译某一块内容,只能说看到哪翻译到哪,下次继续…
    由于本人水平有限翻译的不恰当(错误)的地方还请指出!谢谢!
    要讨论的同学,老师们可以直接在评论区留言(本人不经常逛CSDN可能回复不会很即时请见谅)
    更快的联系方式:可以移步我的cpperference的讨论页中留言或是在讨论页的签名处有直接联系方式
    最后谢谢各位看客来看本人的撇脚翻译!


    ISO/IEC 14882 2017 5edition个人翻译

    8 Expressions

    介绍

    12

    In some contexts, an expression only appears for its side effects. Such an expression is called a discarded-value expression. The array-to-pointer (7.2) and function-to-pointer (7.3) standard conversions are not applied.


    在有些代码中(原义为在一些上下文中),一个表达式只体现其副作用的,这样的表达式就是弃值表达式。数组向指针转换和函数向函数指针的标准转换是不会进行的。


    8.2.9

    6

    Any expression can be explicitly converted to type cv void, in which case it becomes a discarded-value expression (Clause 8) . [ Note: However, if the value is in a temporary object (15.2) , the destructor for that object is not executed until the usual time, and the value of the object is preserved for the purpose of executing the destructor. — end note ]


    任何一个显示转化为可含有cv制定副的void类型的表达式会变成一个亡值表达式[注意:虽然如此,如果这个值是在零时对象中,直到常规时间,该对象的析构函数都不会被执行,该对象的这个值是为了执行虚构函数而被保留的。


    8.19

    1

    The comma operat or groups left - to- right .
    expression :
        assignment-expression
        expression , assignment-expression
    A pair of expressions separated by a comma is evaluated left-to-right; the left expression is a discarded-value expression (Clause 8) . 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 bit-field. If the right operand is a temporary expression (15.2) , the result is a temporary expression.


    逗号操作或逗号组是从左到右结合的
    一组表达式被逗号分离是从左到右依次求值的,其中左表达式是一个弃值表达式,左边的求值和副作用产生总是先于右边的,表达式的值和表达式的类型都是右造作数的相关值和类型或位域,如果右操作表达式是一个零时表达式,那么整个表达式的值类别是一个零时表达式。


    相关文章

      网友评论

          本文标题:ISO/IEC 14882 2017 5edition个人翻译

          本文链接:https://www.haomeiwen.com/subject/rigciftx.html