std::swap
标头中定义了以前版本的 C++ <algorithm>
,但现在已移至<utility>
. 我很确定后一个头文件存在于标准的早期版本中,但我非常感谢您对此进行确认!
问问题
191 次
3 回答
11
Yes. It's where std::pair
was formally included back in C++03 along with the std::rel_ops
namespace that provided relational operators such as !=, >, >= and <=.
It's formally defined in section 20.2 of the C++98 standard.
于 2013-08-05T19:27:06.887 回答
2
是的。它曾经定义relops
andstd::pair
以及其他一些东西(现在仍然如此,但现在它也包括swap
等)。
于 2013-08-05T19:28:54.240 回答
1
I don't know exactly when appeared but it was avery long time ago. It defines Pair which I have used for at least ten years....
于 2013-08-05T19:28:06.480 回答