libgphoto2 photo camera library (libgphoto2) API 2.5.30
|
Allow compile time assertions with or without C11. More...
Go to the source code of this file.
Macros | |
#define | COMPILETIME_ASSERT(CONDITION) |
#define | MAKE_BARE_COMPILETIME_ASSERT_NAME |
#define | MAKE_BARE_COMPILETIME_ASSERT_NAME1(BASE, PARAM) MAKE_BARE_COMPILETIME_ASSERT_NAME2(BASE, PARAM) |
#define | MAKE_BARE_COMPILETIME_ASSERT_NAME2(BASE, PARAM) BASE ## _ ## PARAM |
#define | BARE_COMPILETIME_ASSERT(CONDITION) |
Allow compile time assertions with or without C11.
C11 has added static_assert(EXPR, MSG) to assert.h, but C99 only knows runtime assertions using assert(EXPR). This defines COMPILETIME_ASSERT(EXPR) which works with both C99 and C11 and later.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#define BARE_COMPILETIME_ASSERT | ( | CONDITION | ) |
Compiletime assertion for use outside a function.
#define COMPILETIME_ASSERT | ( | CONDITION | ) |
Compiletime assertion for use inside a function.
#define MAKE_BARE_COMPILETIME_ASSERT_NAME |