Open pablo-msft opened 2 months ago
@pablo-msft Your concerns are valid, unfortunately this is the baggage we have from the legacy implementation, and it can't be changed at this time. As of now, your can undef the macro, or preserve the old PAL macro definition at the place of conflict, and revert afterwards. Let us know if you have further comments ?
Problem line: https://github.com/microsoft/cpp_client_telemetry/blame/5068a981e2dc6ebe935e3184c011a1d8edfd6e8a/lib/include/public/ctmacros.hpp#L11
In our project, we have code like:
When I #include LogManager.hpp, the compiler reports:
This telemetry library should try to avoid global namespace conflicts, of which PAL is one, by appending a prefix like MAT_PAL or similar. Additionally, the library should additionally shy away from utilizing macros as namespaces, such as with
PAL::getUtcSystemTimeMs()
in the library code.