blob: beeca2aa156f1a729d95d90d09b5bdfb06111b61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Copyright (c) 2012 Google Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
template <bool>
struct CompileAssert {
};
#define COMPILE_ASSERT(expr, msg) \
typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
int main() {
COMPILE_ASSERT(char(-1) > 0, default_char_is_unsigned);
return 0;
}
|