对于下面的代码,为什么输出为1?
#include<iostream> #include<array> int main() { std::array<int, 5> a { 10, 11, 12, 15, 14 }; std::array<int, 5> b { 11, 12, 13, 14, 15 }; std::cout << (a < b); }
他们使用标准算法std::lexicographical_compare
std::lexicographical_compare