问题描述
在C ++ 20中使用三向比较时,例如:
type1 foo = Value1;
type2 bar = Value2;
auto res = foo <=> bar ;
对于type1
和type2
是哪种类型,res
的类型将是std::weak_ordering
,std::strong_ordering
,std::partial_ordering
或格式不正确???
例如,当type1
和type2
均为float
/ double
时,则res
将是std::partial_ordering
。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)