tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_function.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_FUNCTION_HPP
4#define TETL_TYPE_TRAITS_IS_FUNCTION_HPP
5
6#include <etl/_config/all.hpp>
7
11
12namespace etl {
13
14#if defined(TETL_COMPILER_MSVC)
15 // Qualifier applied to function has no meaning
16 #pragma warning(disable: 4180)
17#endif
18
19template <typename T>
20struct is_function : bool_constant<not is_const_v<T const> and not is_reference_v<T>> { };
21
22#if defined(TETL_COMPILER_MSVC)
23 // Qualifier applied to function has no meaning
24 #pragma warning(default: 4180)
25#endif
26
34template <typename T>
35inline constexpr bool is_function_v = is_function<T>::value;
36
37} // namespace etl
38
39#endif // TETL_TYPE_TRAITS_IS_FUNCTION_HPP
Definition adjacent_find.hpp:8
constexpr bool is_function_v
Checks whether T is a function type. Types like etl::inplace_function, lambdas, classes with overload...
Definition is_function.hpp:35
integral_constant< bool, B > bool_constant
Definition bool_constant.hpp:11
static constexpr bool value
Definition integral_constant.hpp:10
Definition is_function.hpp:20