在c中的int x = x;
lvalue to-to-to-to-rvalue转换
的证据,尽管在标准上没有明确要求,因此,各种操作者都暗示了构建的主要作战者。例如,标准指出,内置分配运算符需要对正确操作数的LVALUE到RVALUE转换。其他规定还表明,通常预期的是,除非明确指定另有说明。dialition与分配的含义分类可能扩展到该区域的歧义。 Evidence suggests that the intended specification is to expect prvalues wherever a value is needed.
Consequences for int x = x;Assuming the conjecture holds true, initializing x with itself would require lvalue-to-rvalue conversion on an uninitialized value, leading to undefined behavior.
Supporting EvidencesFurther evidence arises from the consideration of code that assigns uninitialized variables with different types and different assignments.不一致的行为,例如防止参考初始化的含量到比值转换,但允许对象初始化,这为lvalue to-rvalue转换预期是否可以进行拷贝启动。 LVALUE到值转换。这表明在诸如int x = x;。
结论[&& && &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&读的证据[&& && &&&&&& && && hercvalsive Insess int int ointizited Intike Inted Inte Intik是很合理少)反过来,由于右手X的非直接性质,这导致了不确定的行为。该标准的不一致和需要澄清的不一致强调了对价值类别的详细规范的重要性。
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3