tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_implicit_default_constructible.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2021 Tobias Hienzsch
3
4#ifndef TETL_TYPE_TRAITS_IS_IMPLICIT_DEFAULT_CONSTRUCTIBLE_HPP
5#define TETL_TYPE_TRAITS_IS_IMPLICIT_DEFAULT_CONSTRUCTIBLE_HPP
6
7#include <etl/_type_traits/bool_constant.hpp>
8#include <etl/_type_traits/is_default_constructible.hpp>
9
10namespace etl {
11
12template <typename T>
14
15template <typename T, typename = void, typename = typename etl::is_default_constructible<T>::type>
16struct is_implicit_default_constructible : false_type { };
17
18template <typename T>
19struct is_implicit_default_constructible<T, decltype(test_implicit_default_constructible<T const&>({})), true_type>
20 : true_type { };
21
22template <typename T>
23struct is_implicit_default_constructible<T, decltype(test_implicit_default_constructible<T const&>({})), false_type>
24 : false_type { };
25
26template <typename T>
28
29} // namespace etl
30
31#endif // TETL_TYPE_TRAITS_IS_IMPLICIT_DEFAULT_CONSTRUCTIBLE_HPP
Definition adjacent_find.hpp:9
void test_implicit_default_constructible(T)
constexpr auto is_implicit_default_constructible_v
Definition is_implicit_default_constructible.hpp:27
If etl::is_constructible<T>::value is true, provides the member constant value equal to true,...
Definition is_default_constructible.hpp:24
Definition is_implicit_default_constructible.hpp:16