Skip to content

Commit

Permalink
Avoid namespace clash for fmt
Browse files Browse the repository at this point in the history
## Problem

In the case of an existing `fmt` namespace (in my project this looks like `Project::fmt`) it is possible to get a namespace clash in debug builds (MSVC 2017)

## Proposed Solution

When referencing `fmt` internally, be explicit that it is relative to the global namespace using `::fmt`
  • Loading branch information
lefticus authored and vitaut committed Jan 15, 2020
1 parent 40638a7 commit 4ccbe4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ FMT_API void assert_fail(const char* file, int line, const char* message);
# define FMT_ASSERT(condition, message) \
((condition) \
? void() \
: fmt::internal::assert_fail(__FILE__, __LINE__, (message)))
: ::fmt::internal::assert_fail(__FILE__, __LINE__, (message)))
# endif
#endif

Expand Down

0 comments on commit 4ccbe4b

Please sign in to comment.