该术语等效'平均C++标准?

发布于 2025-01-31 05:12:10 字数 357 浏览 0 评论 0原文

根据,第421页,表23 - CopyAssignable,它说表达式t = v copyAssignable类型的条件是

t等于v,v的值不变

但我不确定“等效”一词在这里意味着什么。是指t == v吗?还是类似所有字节的东西在“ deepcopy”意义上是等效的“深度”?

According to the draft of the C++ 11 standard, page 421, Table 23 — CopyAssignable, it says that post-condition of an expression t = v of copyassignable type is

t is equivalent to v, the value of v is unchanged

But I'm not sure what the term 'equivalent' means here. Is it mean t == v? Or something like all bytes are equivalent 'deeply' in sense of 'deepcopy'?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情愿 2025-02-07 05:12:10

据我所知,标准中的“等效”一词没有单独的定义。它可以解释为普通英语。以下是字典中的一些定义:

  • 对应或几乎相同,特别是在作用或功能上
  • 等于或具有与某物相同的效果
  • 与其他东西相同的数量,价格,大小等的东西

其他解释的目的是,您的报价是在这种情况下,等效的定义是,所讨论类型的平等含义是由该类型的分配操作员定义的。

As far as I can tell, there is no separate definition of the term "equivalent" that would apply in the standard. It may be interpreted as plain English. Here are a few definitions from dictionaries:

  • corresponding or virtually identical especially in effect or function
  • equal to or having the same effect as something
  • something that is the same amount, price, size, etc. as something else or has the same purpose as something else

Another interpretation is that your quote is the definition for equivalent in this context i.e. the meaning of equality for the type in question is defined by the assignment operator of that type.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文