Skip to content

Commit 0a4da9b

Browse files
committed
fix test and example
1 parent bc864c9 commit 0a4da9b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/quill/MacroFree.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
#if QUILL_CPLUSPLUS >= 202002L
1515
#if QUILL_HAS_INCLUDE(<source_location>)
1616
#include <source_location>
17+
#define QUILL_HAS_SOURCE_LOCATION 1
1718
#elif QUILL_HAS_INCLUDE(<experimental/source_location>)
1819
#include <experimental/source_location>
20+
#define QUILL_HAS_EXPERIMENTAL_SOURCE_LOCATION 1
1921
#else
2022
#error \
2123
"MacroFree header requires <source_location> or <experimental/source_location> to be available"
@@ -29,13 +31,11 @@
2931

3032
QUILL_BEGIN_NAMESPACE
3133

32-
// clang-format off
33-
#if QUILL_HAS_INCLUDE(<source_location>)
34-
using source_location_t = std::source_location;
35-
#elif QUILL_HAS_INCLUDE(<experimental/source_location>)
36-
using source_location_t = std::experimental::source_location;
34+
#if defined(QUILL_HAS_SOURCE_LOCATION)
35+
using source_location_t = std::source_location;
36+
#elif defined(QUILL_HAS_EXPERIMENTAL_SOURCE_LOCATION)
37+
using source_location_t = std::experimental::source_location;
3738
#endif
38-
// clang-format on
3939

4040
/**
4141
* Tag structure for log messages

0 commit comments

Comments
 (0)