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:
mbonadei
2017-05-15 08:06:47 -07:00
committed by Commit bot
parent 9e6a290c8d
commit 9baa77981f
10 changed files with 18 additions and 9 deletions

View 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_