“CopyConstructible” requirement for C++ stl container element

后端 未结 6 1166
后悔当初
后悔当初 2021-01-04 22:05

Regarding to the requirement for C++ stl container element, the standard says: the element type should be CopyConstructible, and there is a table for CopyConstructible requi

6条回答
  •  梦谈多话
    2021-01-04 22:41

    Related post: What is the difference between equality and equivalence?

    Edited to make this a "non comment".

    Equivalence means "equal for all intents and purposes". For example: 1.0001 and 1 are never equal, but under certain circumstances they are equivalent. This is the general answer.

    What the books mean are that the copied objects must satisfy the strict weak ordering condition with the original object: copy < original == false && original < copy == false.

提交回复
热议问题