Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_abstract.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_STDLIB_INCLUDE_STDLIB_DETAIL_IS_ABSTRACT_HPP_
6
#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_ABSTRACT_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: private, include <type_traits>
12
// IWYU pragma: friend "stdlib_detail/.*"
13
14
#include "
stdlib/include/stdlib_detail/integral_constant.hpp
"
15
16
namespace
std
{
17
18
/// @brief Type trait to detect if a type is an abstract class
19
/// @tparam T type may be an abstract class
20
///
21
template
<
class
T>
22
extern
constexpr
bool
is_abstract_v
= __is_abstract(T);
23
24
/// @brief Type trait to detect if a type is an abstract class
25
/// @tparam T type may be an abstract class
26
///
27
template
<
class
T>
28
class
is_abstract
:
public
bool_constant
<is_abstract_v<T>> {};
29
30
}
// namespace std
31
32
#endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_ABSTRACT_HPP_
std::is_abstract
Type trait to detect if a type is an abstract class.
Definition
is_abstract.hpp:28
integral_constant.hpp
std
STL namespace.
std::bool_constant
integral_constant< bool, Value > bool_constant
An alias for integral_constant<bool,Value>
Definition
integral_constant.hpp:71
std::is_abstract_v
constexpr bool is_abstract_v
Type trait to detect if a type is an abstract class.
stdlib
include
stdlib_detail
is_abstract.hpp
Generated by
1.13.2