Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a83f7cb6 authored by Elliott Hughes's avatar Elliott Hughes Committed by Automerger Merge Worker
Browse files

Merge "Deprecate <utils/Debug.h>." am: 5d0eb665 am: f2587f36 am: d6e98167

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

Change-Id: I80ac69ba269ca88e6100ee44723fd1e3e18f2e1d
parents a304bb12 d6e98167
Loading
Loading
Loading
Loading
+4 −22
Original line number Original line Diff line number Diff line
@@ -14,27 +14,9 @@
 * limitations under the License.
 * limitations under the License.
 */
 */


#ifndef ANDROID_UTILS_DEBUG_H
#pragma once
#define ANDROID_UTILS_DEBUG_H


#include <stdint.h>
// Note: new code should use static_assert directly.
#include <sys/types.h>


namespace android {
#define COMPILE_TIME_ASSERT static_assert
// ---------------------------------------------------------------------------
#define COMPILE_TIME_ASSERT_FUNCTION_SCOPE static_assert

#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