Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
internal_disable_constexpr_in_cpp14.hpp
Go to the documentation of this file.
1
// Copyright 2026, Toyota Motor Corporation
2
//
3
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5
#ifndef INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_INTERNAL_DISABLE_CONSTEXPR_IN_CPP14_HPP_
6
#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_INTERNAL_DISABLE_CONSTEXPR_IN_CPP14_HPP_
7
8
// parasoft-begin-suppress CERT_CPP-DCL58-a-2 "Part of a standard library implementation"
9
// parasoft-begin-suppress AUTOSAR-A17_6_1-a-2 "Part of a standard library implementation"
10
11
// IWYU pragma: friend "stdlib_detail/.*"
12
13
// parasoft-begin-suppress AUTOSAR-M3_3_2-a "False positive: inline function used in multiple translation units"
14
15
namespace
std
{
16
namespace
detail
{
17
18
/// @brief function used to disable @c constexpr in C++14 but allow for it in C++17
19
/// @tparam T dummy template parameter used to avoid warnings that a
20
/// @c constexpr function never produces a constant expression
21
///
22
template
<
class
T =
void
>
23
constexpr
auto
disable_constexpr_in_cpp14
() noexcept ->
void
{
24
[]() {}();
25
}
26
27
}
// namespace detail
28
}
// namespace std
29
30
#endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_INTERNAL_DISABLE_CONSTEXPR_IN_CPP14_HPP_
std::detail
Definition
internal_disable_constexpr_in_cpp14.hpp:16
std::detail::disable_constexpr_in_cpp14
constexpr auto disable_constexpr_in_cpp14() noexcept -> void
function used to disable constexpr in C++14 but allow for it in C++17
Definition
internal_disable_constexpr_in_cpp14.hpp:23
std
STL namespace.
stdlib
include
stdlib_detail
internal_disable_constexpr_in_cpp14.hpp
Generated by
1.13.2