GeoDesk for C++
Fast and storage-efficient spatial database engine for OpenStreetMap features
Loading...
Searching...
No Matches
unreachable.h
Go to the documentation of this file.
1
2namespace clarisma {
3// Copyright (c) 2024 Clarisma / GeoDesk contributors
4// SPDX-License-Identifier: LGPL-3.0-only
5
6#pragma once
7
8#ifdef _DEBUG
9#define UNREACHABLE_CASE assert(false); break;
10#else
11#ifdef __GNUC__ // GCC compiler check
12#define UNREACHABLE_CASE __builtin_unreachable();
13#elif defined(_MSC_VER) // MSVC compiler check
14#define UNREACHABLE_CASE __assume(0);
15#endif
16#endif
17
18} // namespace clarisma
Definition Arena.h:17