progsource / maddy

C++ Markdown to HTML header-only parser library
MIT License
194 stars 39 forks source link

[Bug][C++]: parser.h VERSION() functions exposed without namespace creates multiple libraries incompatibilities #44

Closed Ivansstyle closed 12 months ago

Ivansstyle commented 12 months ago

Operating System

ALL

Compiler

ALL

Compiler flags

none

maddy version

1.2.0 (latest)

Minimal C++ example

static const std::string VERSION() { static const std::string v = "1.2.0"; return v; }

What is not working? What did you try?

This function has broken our builds due to our version defines. Please change this global function name to something more scoped to the project or local to the parser class which will not interfere with VERSION define which is used in many projects .Use #define MADDY_VERSION in capitals, otherwise use lowercase letters to not interfere with #define syntax.

This will ensure code compatibility with many other projects, as #define VERSION is generally used to define project version.

progsource commented 12 months ago

Closed with #45

Thank you for reporting this.