Go to the documentation of this file.
23#include "vtkConfigure.h"
42#define VTK_ASSUME(cond) \
44 const bool c = cond; \
45 assert("Bad assumption in VTK_ASSUME: " #cond && c); \
51#if defined(VTK_COMPILER_MSVC) || defined(VTK_COMPILER_ICC)
52# define VTK_ASSUME_IMPL(cond) __assume(cond)
53#elif defined(VTK_COMPILER_GCC) && VTK_COMPILER_GCC_VERSION >= 40500
55# define VTK_ASSUME_IMPL(cond) if (!(cond)) __builtin_unreachable()
56#elif defined(VTK_COMPILER_CLANG)
57# define VTK_ASSUME_IMPL(cond) if (!(cond)) __builtin_unreachable()
59# define VTK_ASSUME_IMPL(cond) do {} while (false)