Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_void.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_VOID_HPP_
6
#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_VOID_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
#include "
stdlib/include/stdlib_detail/is_same.hpp
"
16
#include "
stdlib/include/stdlib_detail/remove_cv.hpp
"
17
18
namespace
std
{
19
20
/// @brief A type trait to check if a type is @c void. The value is @c true if @c Type is @c void, @c false otherwise.
21
/// @tparam Type The type to check
22
template
<
typename
Type>
23
extern
constexpr
bool
is_void_v
=
is_same_v<void, remove_cv_t<Type>
>;
24
25
/// @brief A type trait to check if a type is @c void. The class is derived from @c true_type if @c Type is @c void, @c
26
/// false_type otherwise.
27
/// @tparam Type The type to check
28
template
<
typename
Type>
29
class
is_void
:
public
bool_constant
<is_void_v<Type>> {};
30
31
}
// namespace std
32
33
#endif
// INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_VOID_HPP_
std::is_void
A type trait to check if a type is void. The class is derived from true_type if Type is void,...
Definition
is_void.hpp:29
integral_constant.hpp
is_same.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_same_v
constexpr bool is_same_v
Trait to detect if the two supplied types are the same or not. The value is true if the types are the...
std::is_void_v
constexpr bool is_void_v
A type trait to check if a type is void. The value is true if Type is void, false otherwise.
remove_cv.hpp
stdlib
include
stdlib_detail
is_void.hpp
Generated by
1.13.2