Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
is_default_constructible.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_DEFAULT_CONSTRUCTIBLE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_DEFAULT_CONSTRUCTIBLE_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_constructible.hpp"
16
17namespace std {
18/// @brief Type trait to detect if an instance of @c T is default constructible
19/// @tparam T The type of the value to check
20template <typename T>
21extern constexpr bool is_default_constructible_v = is_constructible_v<T>;
22
23/// @brief Type trait to detect if an instance of @c T is default constructible
24/// @tparam T The type of the value to check
25template <typename T>
27
28/// @brief Type trait to detect if an instance of @c T is default constructible without throwing
29/// @tparam T The type of the value to check
30template <typename T>
32
33/// @brief Type trait to detect if an instance of @c T is default constructible without throwing
34/// @tparam T The type of the value to check
35template <typename T>
37
38/// @brief Type trait to detect if an instance of @c T is trivially default constructible
39/// @tparam T The type of the value to check
40template <typename T>
41extern constexpr bool is_trivially_default_constructible_v = __is_trivially_constructible(T);
42
43/// @brief Type trait to detect if an instance of @c T is trivially default constructible
44/// @tparam T The type of the value to check
45template <typename T>
47
48} // namespace std
49
50#endif // INCLUDE_GUARD_ARENE_BASE_STDLIB_INCLUDE_STDLIB_DETAIL_IS_DEFAULT_CONSTRUCTIBLE_HPP_
Type trait to detect if an instance of T is default constructible.
Definition is_default_constructible.hpp:26
Type trait to detect if an instance of T is default constructible without throwing.
Definition is_default_constructible.hpp:36
Type trait to detect if an instance of T is trivially default constructible.
Definition is_default_constructible.hpp:46
constexpr bool is_default_constructible_v
Type trait to detect if an instance of T is default constructible.
constexpr bool is_trivially_default_constructible_v
Type trait to detect if an instance of T is trivially default constructible.
constexpr bool is_nothrow_default_constructible_v
Type trait to detect if an instance of T is default constructible without throwing.
constexpr auto operator()(::arene::base::result< void, E > const &value) const noexcept(noexcept(hash< E >{}(std::declval< E const & >()))) -> std::size_t
Calculate the hash of a result.
Definition result.hpp:1827