folly::transparent 模板类可以用比较器实例化,从而支持异型查找: #include <set> struct S { template<class T, class U> bool operator()(T& a, U& b) const { return a < b; } }; struct Man { int id_; auto operator<=>(const Man&)…
folly::transparent 模板类可以用比较器实例化,从而支持异型查找: #include <set> struct S { template<class T, class U> bool operator()(T& a, U& b) const { return a < b; } }; struct Man { int id_; auto operator<=>(const Man&)…
讨论
登录后参与讨论
还没有评论,来说第一句吧。