Function operator<


#include <include/internal/catch_common.h>

bool operator<(SourceLineInfo const &other) const noexcept


No description yet.


Lines 21-25 in include/internal/catch_common.cpp. Line 62 in include/internal/catch_common.h.

bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept {
    // We can assume that the same file will usually have the same pointer.
    // Thus, if the pointers are the same, there is no point in calling the strcmp
    return line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0));

Add Discussion as Guest

Log in