研究同事的一些代码时,我发现了以下内容:
friend bool operator==<>(ValueIter<Type> const &rhs, ValueIter<Type> const &lhs);
这是在一个模板类中声明的:
template<typename Type>
class ValueIter: public std::iterator<std::bidirectional_iterator_tag, Type>
有人能告诉我 ==<>
符号代表什么吗?我想这应该与 !=
运算符有关。
==<>
表示什么?在我看来,它表示如果人们不试图通过省略“不必要”的空格来“节省”源代码中的一个字节,那么可以避免多少 WTF。 - user719662