32 lines
1.2 KiB
C
32 lines
1.2 KiB
C
////////////////////////////////////////////////////////////////////////////////
|
|
// Copyright 2016 Google LLC.
|
|
//
|
|
// This software is licensed under the terms defined in the Widevine Master
|
|
// License Agreement. For a copy of this agreement, please contact
|
|
// widevine-licensing@google.com.
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef BASE_MACROS_H_
|
|
#define BASE_MACROS_H_
|
|
|
|
#include "absl/base/macros.h"
|
|
|
|
// DISALLOW_COPY_AND_ASSIGN disallows the copy constructor and copy assignment
|
|
// operator. DISALLOW_IMPLICIT_CONSTRUCTORS is like DISALLOW_COPY_AND_ASSIGN,
|
|
// but also disallows the default constructor, intended to help make a
|
|
// class uninstantiable.
|
|
//
|
|
// These must be placed in the private: declarations for a class.
|
|
//
|
|
// Note: New code should prefer static_assert over COMPILE_ASSERT.
|
|
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
|
TypeName(const TypeName&) = delete; \
|
|
TypeName& operator=(const TypeName&) = delete
|
|
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \
|
|
TypeName() = delete; \
|
|
DISALLOW_COPY_AND_ASSIGN(TypeName)
|
|
|
|
#define arraysize(array) ABSL_ARRAYSIZE(array)
|
|
|
|
#endif // BASE_MACROS_H_
|