You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
namespace projectName::PAL {
class Object {};
}
namespace projectName {
PAL::Object; // or projectName::PAL::Object - exact same compiler error message
}
When I #include LogManager.hpp, the compiler reports:
error C2039: 'Object': is not a member of 'Microsoft::Applications::Events::PlatformAbstraction'
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.
The text was updated successfully, but these errors were encountered:
@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.The text was updated successfully, but these errors were encountered: