1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 Ericsson Telecom AB
3 // All rights reserved. This program and the accompanying materials
4 // are made available under the terms of the Eclipse Public License v1.0
5 // which accompanies this distribution, and is available at
6 // http://www.eclipse.org/legal/epl-v10.html
7 ///////////////////////////////////////////////////////////////////////////////
8 #ifndef STATIC_CHECK_HH
9 #define STATIC_CHECK_HH
13 template<bool> struct CompileTimeError
;
14 template<> struct CompileTimeError
<true> {}; // false never defined
16 #define STATIC_ASSERT(expr) CompileTimeError<(expr) != 0>()
20 #define STATIC_ASSERT(x) do { enum { assert_static_ = 1/(x) }; } while(0)
24 #define ENSURE_EQUAL(x, y) STATIC_ASSERT((int)(x) == (int)(y));
This page took 0.042532 seconds and 5 git commands to generate.