|
|
|||
File indexing completed on 2025-12-17 09:37:08
0001 // Copyright 2022 The Abseil Authors. 0002 // 0003 // Licensed under the Apache License, Version 2.0 (the "License"); 0004 // you may not use this file except in compliance with the License. 0005 // You may obtain a copy of the License at 0006 // 0007 // https://www.apache.org/licenses/LICENSE-2.0 0008 // 0009 // Unless required by applicable law or agreed to in writing, software 0010 // distributed under the License is distributed on an "AS IS" BASIS, 0011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0012 // See the License for the specific language governing permissions and 0013 // limitations under the License. 0014 // 0015 // ----------------------------------------------------------------------------- 0016 // File: log/internal/voidify.h 0017 // ----------------------------------------------------------------------------- 0018 // 0019 // This class is used to explicitly ignore values in the conditional logging 0020 // macros. This avoids compiler warnings like "value computed is not used" and 0021 // "statement has no effect". 0022 0023 #ifndef ABSL_LOG_INTERNAL_VOIDIFY_H_ 0024 #define ABSL_LOG_INTERNAL_VOIDIFY_H_ 0025 0026 #include "absl/base/config.h" 0027 0028 namespace absl { 0029 ABSL_NAMESPACE_BEGIN 0030 namespace log_internal { 0031 0032 class Voidify final { 0033 public: 0034 // This has to be an operator with a precedence lower than << but higher than 0035 // ?: 0036 template <typename T> 0037 void operator&&(const T&) const&& {} 0038 }; 0039 0040 } // namespace log_internal 0041 ABSL_NAMESPACE_END 0042 } // namespace absl 0043 0044 #endif // ABSL_LOG_INTERNAL_VOIDIFY_H_
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|