gpt4 book ai didi

c++ - std::type_index 的 less 是如何实现的?

转载 作者:行者123 更新时间:2023-12-01 17:43:25 28 4
gpt4 key购买 nike

std::type_index 有一个小于运算符,应该使用 std::type_infostd::type_info 没有小于运算符。

那么std::type_index怎么会有小于运算符呢?

https://en.cppreference.com/w/cpp/types/type_index

最佳答案

documentation for the comparison operator状态:

Compares the underlying std::type_info objects as defined by an implementation-defined ordering. The comparison is done by type_info::before.

关于c++ - std::type_index 的 less 是如何实现的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59775541/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com