From 59e47de8ba65dc1bfcb96fffbac8ffeb43c101db Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 22 Jun 2017 18:09:20 -0700 Subject: [PATCH] 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 --- folly/experimental/logging/Logger.h | 4 +++- folly/experimental/logging/xlog.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/folly/experimental/logging/Logger.h b/folly/experimental/logging/Logger.h index 36a8018e..5525c4ea 100644 --- a/folly/experimental/logging/Logger.h +++ b/folly/experimental/logging/Logger.h @@ -27,11 +27,12 @@ * * This macro generally should not be used directly by end users. */ +/* clang-format off */ #define FB_LOG_IMPL(logger, level, type, ...) \ (!(logger).getCategory()->logCheck(level)) \ ? ::folly::logDisabledHelper( \ std::integral_constant{}) \ - : ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} & \ + : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} & \ ::folly::LogStreamProcessor{(logger).getCategory(), \ (level), \ __FILE__, \ @@ -39,6 +40,7 @@ (type), \ ##__VA_ARGS__} \ .stream() +/* clang-format on */ /** * Log a message to the specified logger. diff --git a/folly/experimental/logging/xlog.h b/folly/experimental/logging/xlog.h index 686bb1c7..a8abbd50 100644 --- a/folly/experimental/logging/xlog.h +++ b/folly/experimental/logging/xlog.h @@ -112,11 +112,12 @@ * initialized. On all subsequent calls, disabled log statements can be * skipped with just a single check of the LogLevel. */ +/* clang-format off */ #define XLOG_IMPL(level, type, ...) \ (!XLOG_IS_ON_IMPL(level)) \ ? ::folly::logDisabledHelper( \ std::integral_constant{}) \ - : ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} & \ + : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} & \ ::folly::LogStreamProcessor( \ [] { \ static ::folly::XlogCategoryInfo \ @@ -132,6 +133,7 @@ (type), \ ##__VA_ARGS__) \ .stream() +/* clang-format on */ /** * Check if and XLOG() statement with the given log level would be enabled. -- 2.34.1