odygrd / quill

Asynchronous Low Latency C++ Logging Library
MIT License
1.53k stars 157 forks source link

"Version Info" Constants in global namespace #465

Closed 12AT7 closed 4 months ago

12AT7 commented 4 months ago

I am mostly done migrating my code to the new version 4. Looks great!

I am not sure these should be in the global namespace, in Backend.h, as opposed to quill:

/** Version Info **/
constexpr uint32_t VersionMajor{4};
constexpr uint32_t VersionMinor{4};
constexpr uint32_t VersionPatch{0};
constexpr uint32_t Version{VersionMajor * 10000 + VersionMinor * 100 + VersionPatc
h};

These are useful (I dump them to my boot spew) but we are asking for a namespace collision with other libraries and it is also not clear when reading just VersionMajor what it refers to. If it was quill::VersionMajor then everything would be crystal clear.

odygrd commented 4 months ago

Thanks for reporting :) Yes they should be under the namespace, I will get that fixed