Unify the two copies of compile_assert.h

This patch basically deletes webrtc/base/compile_assert.h (which is
the more outdated copy) and moves
webrtc/system_wrappers/source/compile_assert.h to take its place.

R=aluebs@webrtc.org, andrew@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/36719004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8048 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/java/jni/peerconnection_jni.cc b/talk/app/webrtc/java/jni/peerconnection_jni.cc
index 28bd7b8..4a06364 100644
--- a/talk/app/webrtc/java/jni/peerconnection_jni.cc
+++ b/talk/app/webrtc/java/jni/peerconnection_jni.cc
@@ -78,12 +78,12 @@
 #include "third_party/libyuv/include/libyuv/video_common.h"
 #include "webrtc/base/bind.h"
 #include "webrtc/base/checks.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/base/logging.h"
 #include "webrtc/base/messagequeue.h"
 #include "webrtc/base/ssladapter.h"
 #include "webrtc/common_video/interface/texture_video_frame.h"
 #include "webrtc/modules/video_coding/codecs/interface/video_codec_interface.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/trace.h"
 #include "webrtc/video_engine/include/vie_base.h"
 #include "webrtc/voice_engine/include/voe_base.h"
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index 4be96c2..c254571 100644
--- a/webrtc/base/BUILD.gn
+++ b/webrtc/base/BUILD.gn
@@ -106,6 +106,7 @@
   sources = [
     "checks.cc",
     "checks.h",
+    "compile_assert.h",
     "exp_filter.cc",
     "exp_filter.h",
     "md5.cc",
diff --git a/webrtc/base/base.gyp b/webrtc/base/base.gyp
index 645c1dc..3444ce2 100644
--- a/webrtc/base/base.gyp
+++ b/webrtc/base/base.gyp
@@ -41,6 +41,7 @@
       'sources': [
         'checks.cc',
         'checks.h',
+        'compile_assert.h',
         'exp_filter.cc',
         'exp_filter.h',
         'md5.cc',
diff --git a/webrtc/base/compile_assert.h b/webrtc/base/compile_assert.h
index ad9e179..47d40a9 100644
--- a/webrtc/base/compile_assert.h
+++ b/webrtc/base/compile_assert.h
@@ -8,16 +8,16 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-// COMPILE_ASSERT macro, borrowed from google3/base/macros.h.
+// Borrowed from Chromium's src/base/macros.h.
+
 #ifndef WEBRTC_BASE_COMPILE_ASSERT_H_
 #define WEBRTC_BASE_COMPILE_ASSERT_H_
-#include "webrtc/typedefs.h"
 
 // The COMPILE_ASSERT macro can be used to verify that a compile time
 // expression is true. For example, you could use it to verify the
 // size of a static array:
 //
-//   COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES,
+//   COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
 //                  content_type_names_incorrect_size);
 //
 // or to make sure a struct is smaller than a certain size:
@@ -31,13 +31,20 @@
 // TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and
 // libjingle are merged.
 #if !defined(COMPILE_ASSERT)
+#if __cplusplus >= 201103L
+// Under C++11, just use static_assert.
+#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
+
+#else
 template <bool>
 struct CompileAssert {
 };
 
 #define COMPILE_ASSERT(expr, msg) \
-  typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1] ATTRIBUTE_UNUSED
-#endif  // COMPILE_ASSERT
+  typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
+
+#endif  //  __cplusplus >= 201103L
+#endif  //  !defined(COMPILE_ASSERT)
 
 // Implementation details of COMPILE_ASSERT:
 //
diff --git a/webrtc/common_audio/resampler/sinc_resampler.cc b/webrtc/common_audio/resampler/sinc_resampler.cc
index 165cb35..352c84c 100644
--- a/webrtc/common_audio/resampler/sinc_resampler.cc
+++ b/webrtc/common_audio/resampler/sinc_resampler.cc
@@ -85,8 +85,8 @@
 // MSVC++ requires this to be set before any other includes to get M_PI.
 #define _USE_MATH_DEFINES
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/common_audio/resampler/sinc_resampler.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/cpu_features_wrapper.h"
 #include "webrtc/typedefs.h"
 
diff --git a/webrtc/common_audio/wav_header_unittest.cc b/webrtc/common_audio/wav_header_unittest.cc
index 63ede83..546cc1e 100644
--- a/webrtc/common_audio/wav_header_unittest.cc
+++ b/webrtc/common_audio/wav_header_unittest.cc
@@ -11,8 +11,8 @@
 #include <limits>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/common_audio/wav_header.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
index b64c74d..7e3494b 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest.cc
@@ -13,6 +13,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 #include "webrtc/base/checks.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/base/md5digest.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_receive_test.h"
@@ -27,7 +28,6 @@
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
index e887317..b8f12af 100644
--- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
+++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc
@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/base/md5digest.h"
 #include "webrtc/base/thread_annotations.h"
 #include "webrtc/modules/audio_coding/main/acm2/acm_receive_test_oldapi.h"
@@ -27,7 +28,6 @@
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
 #include "webrtc/modules/interface/module_common_types.h"
 #include "webrtc/system_wrappers/interface/clock.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/event_wrapper.h"
 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
diff --git a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
index ae2d1ae..5ed528d 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_external_decoder_unittest.cc
@@ -15,11 +15,11 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/audio_coding/neteq/interface/neteq.h"
 #include "webrtc/modules/audio_coding/neteq/mock/mock_external_decoder_pcm16b.h"
 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
 #include "webrtc/modules/audio_coding/neteq/tools/rtp_generator.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
diff --git a/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h b/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h
index ac56826..6070eff 100644
--- a/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h
+++ b/webrtc/modules/audio_coding/neteq/tools/audio_checksum.h
@@ -13,11 +13,11 @@
 
 #include <string>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/md5digest.h"
 #include "webrtc/base/stringencode.h"
 #include "webrtc/modules/audio_coding/neteq/tools/audio_sink.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/typedefs.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_processing/agc/agc.cc b/webrtc/modules/audio_processing/agc/agc.cc
index 298cfd9..8c2e1c3 100644
--- a/webrtc/modules/audio_processing/agc/agc.cc
+++ b/webrtc/modules/audio_processing/agc/agc.cc
@@ -15,6 +15,7 @@
 
 #include <algorithm>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/common_audio/resampler/include/resampler.h"
 #include "webrtc/modules/audio_processing/agc/agc_audio_proc.h"
 #include "webrtc/modules/audio_processing/agc/common.h"
@@ -23,7 +24,6 @@
 #include "webrtc/modules/audio_processing/agc/standalone_vad.h"
 #include "webrtc/modules/audio_processing/agc/utility.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 
 namespace webrtc {
 namespace {
diff --git a/webrtc/modules/audio_processing/agc/agc_audio_proc.cc b/webrtc/modules/audio_processing/agc/agc_audio_proc.cc
index 002b201..bdefdf4 100644
--- a/webrtc/modules/audio_processing/agc/agc_audio_proc.cc
+++ b/webrtc/modules/audio_processing/agc/agc_audio_proc.cc
@@ -13,6 +13,7 @@
 #include <math.h>
 #include <stdio.h>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h"
 #include "webrtc/modules/audio_processing/agc/pitch_internal.h"
 #include "webrtc/modules/audio_processing/agc/pole_zero_filter.h"
@@ -24,7 +25,6 @@
 #include "webrtc/modules/audio_processing/utility/fft4g.h"
 }
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h b/webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h
index dc125ef..24ba741 100644
--- a/webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h
+++ b/webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h
@@ -11,7 +11,7 @@
 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_AUDIO_PROC_INTERNAL_H_
 #define WEBRTC_MODULES_AUDIO_PROCESSING_AGC_AGC_AUDIO_PROC_INTERNAL_H_
 
-#include "webrtc/system_wrappers/interface/compile_assert.h"
+#include "webrtc/base/compile_assert.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/agc/agc_manager_direct.cc b/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
index 37248c1..99f4509 100644
--- a/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
+++ b/webrtc/modules/audio_processing/agc/agc_manager_direct.cc
@@ -17,10 +17,10 @@
 #include <cstdio>
 #endif
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/audio_processing/agc/gain_map_internal.h"
 #include "webrtc/modules/audio_processing/gain_control_impl.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/logging.h"
 
 namespace webrtc {
diff --git a/webrtc/modules/audio_processing/agc/histogram.cc b/webrtc/modules/audio_processing/agc/histogram.cc
index ab18c65..fa511b6 100644
--- a/webrtc/modules/audio_processing/agc/histogram.cc
+++ b/webrtc/modules/audio_processing/agc/histogram.cc
@@ -13,8 +13,8 @@
 #include <cmath>
 #include <cstring>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/agc/pitch_based_vad.cc b/webrtc/modules/audio_processing/agc/pitch_based_vad.cc
index 675a1c8..bbbc407 100644
--- a/webrtc/modules/audio_processing/agc/pitch_based_vad.cc
+++ b/webrtc/modules/audio_processing/agc/pitch_based_vad.cc
@@ -14,12 +14,12 @@
 #include <math.h>
 #include <string.h>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/audio_processing/agc/circular_buffer.h"
 #include "webrtc/modules/audio_processing/agc/common.h"
 #include "webrtc/modules/audio_processing/agc/noise_gmm_tables.h"
 #include "webrtc/modules/audio_processing/agc/voice_gmm_tables.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 
 namespace webrtc {
 
diff --git a/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc b/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc
index e487858..29837e7 100644
--- a/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc
+++ b/webrtc/modules/audio_processing/agc/pole_zero_filter_unittest.cc
@@ -14,8 +14,8 @@
 #include <stdio.h>
 
 #include "gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/audio_processing/agc/agc_audio_proc_internal.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/test/testsupport/fileutils.h"
 
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index 2483841..0063608 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -12,6 +12,7 @@
 
 #include <assert.h>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/base/platform_file.h"
 #include "webrtc/common_audio/include/audio_util.h"
 #include "webrtc/common_audio/signal_processing/include/signal_processing_library.h"
@@ -30,7 +31,6 @@
 #include "webrtc/modules/audio_processing/transient/transient_suppressor.h"
 #include "webrtc/modules/audio_processing/voice_detection_impl.h"
 #include "webrtc/modules/interface/module_common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
 #include "webrtc/system_wrappers/interface/file_wrapper.h"
 #include "webrtc/system_wrappers/interface/logging.h"
diff --git a/webrtc/modules/desktop_capture/win/cursor.cc b/webrtc/modules/desktop_capture/win/cursor.cc
index e3c272c..53a90e5 100644
--- a/webrtc/modules/desktop_capture/win/cursor.cc
+++ b/webrtc/modules/desktop_capture/win/cursor.cc
@@ -12,11 +12,11 @@
 
 #include <algorithm>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/desktop_capture/win/scoped_gdi_object.h"
 #include "webrtc/modules/desktop_capture/desktop_frame.h"
 #include "webrtc/modules/desktop_capture/desktop_geometry.h"
 #include "webrtc/modules/desktop_capture/mouse_cursor.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/logging.h"
 #include "webrtc/system_wrappers/interface/scoped_ptr.h"
 #include "webrtc/typedefs.h"
diff --git a/webrtc/modules/media_file/source/media_file_unittest.cc b/webrtc/modules/media_file/source/media_file_unittest.cc
index 15c529b..dc70b2b 100644
--- a/webrtc/modules/media_file/source/media_file_unittest.cc
+++ b/webrtc/modules/media_file/source/media_file_unittest.cc
@@ -9,8 +9,8 @@
  */
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/media_file/interface/media_file.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/sleep.h"
 #include "webrtc/test/testsupport/fileutils.h"
 #include "webrtc/test/testsupport/gtest_disable.h"
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
index d2416b2..1412bdf 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
@@ -14,9 +14,9 @@
 
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/typedefs.h"
 
 #define CHECK_ARRAY_SIZE(expected_size, array)                      \
diff --git a/webrtc/system_wrappers/BUILD.gn b/webrtc/system_wrappers/BUILD.gn
index c4d2192..630b3db 100644
--- a/webrtc/system_wrappers/BUILD.gn
+++ b/webrtc/system_wrappers/BUILD.gn
@@ -21,7 +21,6 @@
     "interface/aligned_malloc.h",
     "interface/atomic32.h",
     "interface/clock.h",
-    "interface/compile_assert.h",
     "interface/condition_variable_wrapper.h",
     "interface/cpu_info.h",
     "interface/cpu_features_wrapper.h",
diff --git a/webrtc/system_wrappers/interface/compile_assert.h b/webrtc/system_wrappers/interface/compile_assert.h
deleted file mode 100644
index a075184..0000000
--- a/webrtc/system_wrappers/interface/compile_assert.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *  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.
- */
-
-// Borrowed from Chromium's src/base/macros.h.
-
-#ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_COMPILE_ASSERT_H_
-#define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_COMPILE_ASSERT_H_
-
-// The COMPILE_ASSERT macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-//   COMPILE_ASSERT(ARRAYSIZE_UNSAFE(content_type_names) == CONTENT_NUM_TYPES,
-//                  content_type_names_incorrect_size);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-//   COMPILE_ASSERT(sizeof(foo) < 128, foo_too_large);
-//
-// The second argument to the macro is the name of the variable. If
-// the expression is false, most compilers will issue a warning/error
-// containing the name of the variable.
-
-// TODO(ajm): Hack to avoid multiple definitions until the base/ of webrtc and
-// libjingle are merged.
-#if !defined(COMPILE_ASSERT)
-#if __cplusplus >= 201103L
-// Under C++11, just use static_assert.
-#define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
-
-#else
-template <bool>
-struct CompileAssert {
-};
-
-#define COMPILE_ASSERT(expr, msg) \
-  typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
-
-#endif  //  __cplusplus >= 201103L
-#endif  //  !defined(COMPILE_ASSERT)
-
-// Implementation details of COMPILE_ASSERT:
-//
-// - COMPILE_ASSERT works by defining an array type that has -1
-//   elements (and thus is invalid) when the expression is false.
-//
-// - The simpler definition
-//
-//     #define COMPILE_ASSERT(expr, msg) typedef char msg[(expr) ? 1 : -1]
-//
-//   does not work, as gcc supports variable-length arrays whose sizes
-//   are determined at run-time (this is gcc's extension and not part
-//   of the C++ standard).  As a result, gcc fails to reject the
-//   following code with the simple definition:
-//
-//     int foo;
-//     COMPILE_ASSERT(foo, msg); // not supposed to compile as foo is
-//                               // not a compile-time constant.
-//
-// - By using the type CompileAssert<(bool(expr))>, we ensures that
-//   expr is a compile-time constant.  (Template arguments must be
-//   determined at compile-time.)
-//
-// - The outer parentheses in CompileAssert<(bool(expr))> are necessary
-//   to work around a bug in gcc 3.4.4 and 4.0.1.  If we had written
-//
-//     CompileAssert<bool(expr)>
-//
-//   instead, these compilers will refuse to compile
-//
-//     COMPILE_ASSERT(5 > 0, some_message);
-//
-//   (They seem to think the ">" in "5 > 0" marks the end of the
-//   template argument list.)
-//
-// - The array size is (bool(expr) ? 1 : -1), instead of simply
-//
-//     ((expr) ? 1 : -1).
-//
-//   This is to avoid running into a bug in MS VC 7.1, which
-//   causes ((0.0) ? 1 : -1) to incorrectly evaluate to 1.
-
-#endif  // WEBRTC_SYSTEM_WRAPPERS_INTERFACE_COMPILE_ASSERT_H_
diff --git a/webrtc/system_wrappers/interface/scoped_ptr.h b/webrtc/system_wrappers/interface/scoped_ptr.h
index 0db0ee3..dc1a5a8 100644
--- a/webrtc/system_wrappers/interface/scoped_ptr.h
+++ b/webrtc/system_wrappers/interface/scoped_ptr.h
@@ -104,9 +104,9 @@
 
 #include <algorithm>  // For std::swap().
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/base/constructormagic.h"
 #include "webrtc/base/move.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 #include "webrtc/system_wrappers/interface/template_util.h"
 #include "webrtc/typedefs.h"
 
diff --git a/webrtc/system_wrappers/source/atomic32_win.cc b/webrtc/system_wrappers/source/atomic32_win.cc
index 7c70376..50c4989 100644
--- a/webrtc/system_wrappers/source/atomic32_win.cc
+++ b/webrtc/system_wrappers/source/atomic32_win.cc
@@ -13,8 +13,8 @@
 #include <assert.h>
 #include <windows.h>
 
+#include "webrtc/base/compile_assert.h"
 #include "webrtc/common_types.h"
-#include "webrtc/system_wrappers/interface/compile_assert.h"
 
 namespace webrtc {
 
diff --git a/webrtc/system_wrappers/source/system_wrappers.gyp b/webrtc/system_wrappers/source/system_wrappers.gyp
index 2cdd23d..76df42b 100644
--- a/webrtc/system_wrappers/source/system_wrappers.gyp
+++ b/webrtc/system_wrappers/source/system_wrappers.gyp
@@ -29,7 +29,6 @@
         '../interface/aligned_malloc.h',
         '../interface/atomic32.h',
         '../interface/clock.h',
-        '../interface/compile_assert.h',
         '../interface/condition_variable_wrapper.h',
         '../interface/cpu_info.h',
         '../interface/cpu_features_wrapper.h',