Sha256: 8aa8fa03512263834f067e92b0457b10f1cd49030fbf79e5cbe6d7118789ec06

Contents?: true

Size: 1.42 KB

Versions: 13

Compression:

Stored size: 1.42 KB

Contents

// Copyright 2022 The Abseil Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// -----------------------------------------------------------------------------
// File: log/internal/voidify.h
// -----------------------------------------------------------------------------
//
// This class is used to explicitly ignore values in the conditional logging
// macros. This avoids compiler warnings like "value computed is not used" and
// "statement has no effect".

#ifndef ABSL_LOG_INTERNAL_VOIDIFY_H_
#define ABSL_LOG_INTERNAL_VOIDIFY_H_

#include "absl/base/config.h"

namespace absl {
ABSL_NAMESPACE_BEGIN
namespace log_internal {

class Voidify final {
 public:
  // This has to be an operator with a precedence lower than << but higher than
  // ?:
  template <typename T>
  void operator&&(const T&) const&& {}
};

}  // namespace log_internal
ABSL_NAMESPACE_END
}  // namespace absl

#endif  // ABSL_LOG_INTERNAL_VOIDIFY_H_

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
grpc-1.67.0 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.67.0.pre1 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.66.0 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.66.0.pre5 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.66.0.pre3 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.63.2 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.64.3 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.65.2 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.65.1 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.65.0 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.65.0.pre2 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.65.0.pre1 third_party/abseil-cpp/absl/log/internal/voidify.h
grpc-1.63.0 third_party/abseil-cpp/absl/log/internal/voidify.h