Merge "Deprecate <utils/Debug.h>." am: 5d0eb66590 am: f2587f3698 am: d6e98167a5 am: a83f7cb606 am: ee858fe0b8

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1402847

Change-Id: Iea7d4bc16f35d998baa17da206badc9f8236e0a8
This commit is contained in:
Elliott Hughes 2020-08-17 21:40:04 +00:00 committed by Automerger Merge Worker
commit bb791bc97e

View file

@ -14,27 +14,9 @@
* limitations under the License.
*/
#ifndef ANDROID_UTILS_DEBUG_H
#define ANDROID_UTILS_DEBUG_H
#pragma once
#include <stdint.h>
#include <sys/types.h>
// Note: new code should use static_assert directly.
namespace android {
// ---------------------------------------------------------------------------
#ifdef __cplusplus
template<bool> struct CompileTimeAssert;
template<> struct CompileTimeAssert<true> {};
#define COMPILE_TIME_ASSERT(_exp) \
template class CompileTimeAssert< (_exp) >;
#endif
// DO NOT USE: Please use static_assert instead
#define COMPILE_TIME_ASSERT_FUNCTION_SCOPE(_exp) \
CompileTimeAssert<( _exp )>();
// ---------------------------------------------------------------------------
} // namespace android
#endif // ANDROID_UTILS_DEBUG_H
#define COMPILE_TIME_ASSERT static_assert
#define COMPILE_TIME_ASSERT_FUNCTION_SCOPE static_assert