tetl
0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_object.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSL-1.0
2
// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4
#
ifndef
TETL_TYPE_TRAITS_IS_OBJECT_HPP
5
#
define
TETL_TYPE_TRAITS_IS_OBJECT_HPP
6
7
#
include
<
etl
/
_config
/
all
.
hpp
>
8
9
#
include
<
etl
/
_type_traits
/
bool_constant
.
hpp
>
10
#
include
<
etl
/
_type_traits
/
is_array
.
hpp
>
11
#
include
<
etl
/
_type_traits
/
is_class
.
hpp
>
12
#
include
<
etl
/
_type_traits
/
is_scalar
.
hpp
>
13
#
include
<
etl
/
_type_traits
/
is_union
.
hpp
>
14
15
namespace
etl
{
16
17
/// \brief If T is an object type (that is any possibly cv-qualified type other
18
/// than function, reference, or void types), provides the member constant value
19
/// equal true. For any other type, value is false.
20
template
<
typename
T>
21
struct
is_object;
22
23
#
if
__has_builtin
(
__is_object
)
24
template
<
typename
T>
25
struct
is_object : bool_constant<
__is_object
(T)> { };
26
27
template
<
typename
T>
28
inline
constexpr
bool
is_object_v =
__is_object
(T);
29
30
#
else
31
32
template
<
typename
T
>
33
struct
is_object
:
bool_constant
<
is_scalar_v
<
T
>
or
is_array_v
<
T
>
or
is_union_v
<
T
>
or
is_class_v
<
T
> > { };
34
35
template
<
typename
T
>
36
inline
constexpr
bool
is_object_v
=
is_object
<
T
>::
value
;
37
38
#
endif
39
}
// namespace etl
40
41
#
endif
// TETL_TYPE_TRAITS_IS_OBJECT_HPP
etl
Definition
adjacent_find.hpp:9
include
etl
_type_traits
is_object.hpp
Generated on Sun Sep 7 2025 19:15:18 for tetl by
1.9.8