From 1f4d0b992d8497f8e791e8ae7193d3b6516b5d6f Mon Sep 17 00:00:00 2001 From: CHatingPython Date: Tue, 2 Jun 2026 12:30:18 +0200 Subject: [PATCH] docs: document location --- furc/include/furc/diag.hpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/furc/include/furc/diag.hpp b/furc/include/furc/diag.hpp index 59e15de..efe204b 100644 --- a/furc/include/furc/diag.hpp +++ b/furc/include/furc/diag.hpp @@ -6,15 +6,30 @@ namespace furc { +/** + * @brief A location in file. + */ struct location { - std::string_view filename; - std::size_t line = 0; - std::size_t column = 0; + std::string_view filename; /**< File's name */ + std::size_t line = 0; /**< Line */ + std::size_t column = 0; /**< Column */ + /** + * @brief Compare two locations for equality. + * + * @param rhs Location to compare against. + * @return true if the locations are equal. + */ bool operator==(const location& rhs) const { return filename == rhs.filename && line == rhs.line && column == rhs.column; } + /** + * @brief Compare two locations for inequality. + * + * @param rhs Location to compare against. + * @return true if the locations are not equal. + */ bool operator!=(const location& rhs) const { return !this->operator==(rhs); } };