1 /******************************************************************************
2 * Copyright (c) 2000-2016 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
12 ******************************************************************************/
13 #ifndef STATIC_CHECK_HH
14 #define STATIC_CHECK_HH
18 template<bool> struct CompileTimeError
;
19 template<> struct CompileTimeError
<true> {}; // false never defined
21 #define STATIC_ASSERT(expr) CompileTimeError<(expr) != 0>()
25 #define STATIC_ASSERT(x) do { enum { assert_static_ = 1/(x) }; } while(0)
29 #define ENSURE_EQUAL(x, y) STATIC_ASSERT((int)(x) == (int)(y));
This page took 0.031917 seconds and 5 git commands to generate.