Source code
Revision control
Copy as Markdown
Other Tools
// 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;
}