Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
has_include.hpp
Go to the documentation of this file.
1
// Copyright 2024, Toyota Motor Corporation
2
//
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5
#
ifndef
INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_COMPILER_SUPPORT_PLATFORM_QUERIES_HAS_INCLUDE_HPP_
6
#
define
INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_COMPILER_SUPPORT_PLATFORM_QUERIES_HAS_INCLUDE_HPP_
7
8
// IWYU pragma: private, include "arene/base/compiler_support/platform_queries.hpp"
9
// IWYU pragma: friend "arene/base/compiler_support/platform_queries/.*"
10
11
// NOLINTBEGIN(cppcoreguidelines-macro-usage) Explicitly providing compiler support macro functions
12
// parasoft-begin-suppress AUTOSAR-A16_0_1-d-2 "Conditional defines permitted by A16-0-1 Permit #2"
13
// parasoft-begin-suppress AUTOSAR-A16_0_1-a-2 "Conditional defines permitted by A16-0-1 Permit #2"
14
15
/// @def ARENE_HAS_INCLUDE
16
/// @brief A platform support query for testing if a header exists.
17
/// @param ... The include to test availability of, including the @c <> or @c "".
18
/// @return if @c __has_include is defined, the result of @c __has_include(__VA_ARGS__), otherwise @c false .
19
///
20
/// Example usage testing for @c <version> :
21
/// @code{c++}
22
/// #if ARENE_HAS_INCLUDE(<version>)
23
/// @endcode
24
25
#
if
defined
(
__has_include
)
26
#
define
ARENE_HAS_INCLUDE
(
...
)
__has_include
(
__VA_ARGS__
)
27
#
else
28
#
define
ARENE_HAS_INCLUDE
(
...
)
0
29
#
endif
// checking for __has_include
30
31
// NOLINTEND(cppcoreguidelines-macro-usage) Explicitly providing compiler support macro functions
32
// parasoft-end-suppress AUTOSAR-A16_0_1-d-2
33
// parasoft-end-suppress AUTOSAR-A16_0_1-a-2
34
35
#
endif
// INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_COMPILER_SUPPORT_PLATFORM_QUERIES_HAS_INCLUDE_HPP_
arene
base
compiler_support
platform_queries
has_include.hpp
Generated by
1.13.2