Moving compile_assert_c.h to webrtc/base
This header was not tracked by a GN target and in the discussion on https://bugs.chromium.org/p/webrtc/issues/detail?id=7617 we decided to also move it under webrtc/base. I checked in chromium code search and it seems safe to move it without creating a stub header in webrtc/system_wrappers. BUG=webrtc:7617 Review-Url: https://codereview.webrtc.org/2882673002 Cr-Commit-Position: refs/heads/master@{#18151}
This commit is contained in:
21
webrtc/base/compile_assert_c.h
Normal file
21
webrtc/base/compile_assert_c.h
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_BASE_COMPILE_ASSERT_C_H_
|
||||
#define WEBRTC_BASE_COMPILE_ASSERT_C_H_
|
||||
|
||||
// Use this macro to verify at compile time that certain restrictions are met.
|
||||
// The argument is the boolean expression to evaluate.
|
||||
// Example:
|
||||
// RTC_COMPILE_ASSERT(sizeof(foo) < 128);
|
||||
// Note: In C++, use static_assert instead!
|
||||
#define RTC_COMPILE_ASSERT(expression) switch (0) {case 0: case expression:;}
|
||||
|
||||
#endif // WEBRTC_BASE_COMPILE_ASSERT_C_H_
|
||||
Reference in New Issue
Block a user