SDSL 3.0.1
Succinct Data Structure Library
Loading...
Searching...
No Matches
platform.hpp
Go to the documentation of this file.
1// Copyright (c) 2016, the SDSL Project Authors. All rights reserved.
2// Please see the AUTHORS file for details. Use of this source code is governed
3// by a BSD license that can be found in the LICENSE file.
8#ifndef INCLUDED_SDSL_PLATFORM
9#define INCLUDED_SDSL_PLATFORM
10
12namespace sdsl
13{
14
15#if defined(__clang__)
16#define COMPILER_CLANG
17#endif
18
19#if defined(__GNUC__) && !defined(COMPILER_CLANG)
20#define COMPILER_GCC
21#endif
22
23// eliminate fallthrough warnings
24#define SDSL_FALLTHROUGH
25#if defined(__has_cpp_attribute)
26#if __has_cpp_attribute(fallthrough)
27#undef SDSL_FALLTHROUGH
28#if __cplusplus < 201500 && defined(COMPILER_GCC)
29#define SDSL_FALLTHROUGH [[gnu::fallthrough]];
30#elif __cplusplus < 201500 && defined(COMPILER_CLANG)
31#define SDSL_FALLTHROUGH [[clang::fallthrough]];
32#else
33#define SDSL_FALLTHROUGH [[fallthrough]];
34#endif
35#endif
36#endif
37
38} // end namespace sdsl
39
40#endif
Namespace for the succinct data structure library.