2025-02-08 XLComment::valid() to cpp module to avoid MSVC complaining about use of not keyword

This commit is contained in:
Lars Uffmann
2025-02-08 19:28:13 +01:00
parent 2e986e57fa
commit 6a4eef0b6d
2 changed files with 8 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ namespace OpenXLSX
* @brief Test if XLComment is linked to valid XML
* @return true if comment was constructed on a valid XML node, otherwise false
*/
bool valid() const { return m_commentNode != nullptr &&(not m_commentNode->empty()); }
bool valid() const;
/**
* @brief Getter functions

View File

@@ -104,6 +104,13 @@ XLComment::XLComment(const XMLNode& node)
: m_commentNode(std::make_unique<XMLNode>(node))
{}
/**
* @details
* @note Function body moved to cpp module as it uses "not" keyword for readability, which MSVC sabotages with non-CPP compatibility.
* @note For the library it is reasonable to expect users to compile it with MSCV /permissive- flag, but for the user's own projects the header files shall "just work"
*/
bool XLComment::valid() const { return m_commentNode != nullptr &&(not m_commentNode->empty()); }
/**
* @brief Getter functions
*/