OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_NOTIFIER_BASE_STATIC_ASSERT_H_ |
| 6 #define CHROME_BROWSER_SYNC_NOTIFIER_BASE_STATIC_ASSERT_H_ |
| 7 |
| 8 template <bool> struct STATIC_ASSERTION_FAILURE; |
| 9 |
| 10 template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; }; |
| 11 |
| 12 template<int> struct static_assert_test{}; |
| 13 |
| 14 #define STATIC_ASSERT(B) \ |
| 15 typedef static_assert_test<\ |
| 16 sizeof(STATIC_ASSERTION_FAILURE< (bool)( B ) >)>\ |
| 17 static_assert_typedef_ ## __LINE__ |
| 18 |
| 19 #endif // CHROME_BROWSER_SYNC_NOTIFIER_BASE_STATIC_ASSERT_H_ |
OLD | NEW |