Commit 59e47de8 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot

Stop MSVC from complaining about digraphs not being supported

Summary: MSVC complains about `<:` being a digraph and that it isn't interpreting it as one (C4628). Make it be quiet by making it not look like a digraph.

Reviewed By: simpkins

Differential Revision: D5305162

fbshipit-source-id: 7385164e8f73226ce18bc04c32894c2f27f8ae25
parent d4e51b57
...@@ -27,11 +27,12 @@ ...@@ -27,11 +27,12 @@
* *
* This macro generally should not be used directly by end users. * This macro generally should not be used directly by end users.
*/ */
/* clang-format off */
#define FB_LOG_IMPL(logger, level, type, ...) \ #define FB_LOG_IMPL(logger, level, type, ...) \
(!(logger).getCategory()->logCheck(level)) \ (!(logger).getCategory()->logCheck(level)) \
? ::folly::logDisabledHelper( \ ? ::folly::logDisabledHelper( \
std::integral_constant<bool, ::folly::isLogLevelFatal(level)>{}) \ std::integral_constant<bool, ::folly::isLogLevelFatal(level)>{}) \
: ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} & \ : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} & \
::folly::LogStreamProcessor{(logger).getCategory(), \ ::folly::LogStreamProcessor{(logger).getCategory(), \
(level), \ (level), \
__FILE__, \ __FILE__, \
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
(type), \ (type), \
##__VA_ARGS__} \ ##__VA_ARGS__} \
.stream() .stream()
/* clang-format on */
/** /**
* Log a message to the specified logger. * Log a message to the specified logger.
......
...@@ -112,11 +112,12 @@ ...@@ -112,11 +112,12 @@
* initialized. On all subsequent calls, disabled log statements can be * initialized. On all subsequent calls, disabled log statements can be
* skipped with just a single check of the LogLevel. * skipped with just a single check of the LogLevel.
*/ */
/* clang-format off */
#define XLOG_IMPL(level, type, ...) \ #define XLOG_IMPL(level, type, ...) \
(!XLOG_IS_ON_IMPL(level)) \ (!XLOG_IS_ON_IMPL(level)) \
? ::folly::logDisabledHelper( \ ? ::folly::logDisabledHelper( \
std::integral_constant<bool, ::folly::isLogLevelFatal(level)>{}) \ std::integral_constant<bool, ::folly::isLogLevelFatal(level)>{}) \
: ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} & \ : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} & \
::folly::LogStreamProcessor( \ ::folly::LogStreamProcessor( \
[] { \ [] { \
static ::folly::XlogCategoryInfo<XLOG_IS_IN_HEADER_FILE> \ static ::folly::XlogCategoryInfo<XLOG_IS_IN_HEADER_FILE> \
...@@ -132,6 +133,7 @@ ...@@ -132,6 +133,7 @@
(type), \ (type), \
##__VA_ARGS__) \ ##__VA_ARGS__) \
.stream() .stream()
/* clang-format on */
/** /**
* Check if and XLOG() statement with the given log level would be enabled. * Check if and XLOG() statement with the given log level would be enabled.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment