aboutsummaryrefslogtreecommitdiff
path: root/third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2024-01-17 22:13:58 -0800
committerXin Li <delphij@google.com>2024-01-17 22:13:58 -0800
commit28d03a2a1cabbe01d7bcb6cf5166c10e50d3c2c6 (patch)
treec1643be8ab17fc607cea748a8bb1d621a5964873 /third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h
parentec2628a6ba2d0ecbe3ac10c8c772f6fc6acc345d (diff)
parentf054515492af5132f685cb23fe11891ee77104c9 (diff)
downloadpigweed-28d03a2a1cabbe01d7bcb6cf5166c10e50d3c2c6.tar.gz
Merge Android 24Q1 Release (ab/11220357)temp_319669529
Bug: 319669529 Merged-In: Iba357b308a79d0c8b560acd4f72b5423c9c83294 Change-Id: Icdf552029fb97a34e83c6dd7799433fc473a2506
Diffstat (limited to 'third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h')
-rw-r--r--third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h b/third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h
index dced28d9f..23b544b57 100644
--- a/third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h
+++ b/third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/internal/type_traits.h
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef LIB_STDCOMPAT_INCLUDE_LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
-#define LIB_STDCOMPAT_INCLUDE_LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
+#ifndef LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
+#define LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
+#include <functional>
#include <type_traits>
namespace cpp17 {
@@ -17,11 +18,12 @@ static constexpr bool is_reference_wrapper<std::reference_wrapper<T>> = true;
// These are from [func.require] ΒΆ 1.1-7
template <typename MemFn, typename Class, typename T>
-static constexpr bool invoke_pmf_base = std::is_member_function_pointer<MemFn Class::*>::value&&
- std::is_base_of<Class, std::remove_reference_t<T>>::value;
+static constexpr bool invoke_pmf_base = std::is_member_function_pointer<MemFn Class::*>::value &&
+ std::is_base_of<Class, std::remove_reference_t<T>>::value;
template <typename MemFn, typename Class, typename T>
-static constexpr bool invoke_pmf_refwrap = std::is_member_function_pointer<MemFn Class::*>::value&&
+static constexpr bool invoke_pmf_refwrap =
+ std::is_member_function_pointer<MemFn Class::*>::value &&
is_reference_wrapper<std::remove_cv_t<std::remove_reference_t<T>>>;
template <typename MemFn, typename Class, typename T>
@@ -30,11 +32,12 @@ static constexpr bool invoke_pmf_other =
!invoke_pmf_refwrap<MemFn, Class, T>;
template <typename MemObj, typename Class, typename T>
-static constexpr bool invoke_pmd_base = std::is_member_object_pointer<MemObj Class::*>::value&&
- std::is_base_of<Class, std::remove_reference_t<T>>::value;
+static constexpr bool invoke_pmd_base = std::is_member_object_pointer<MemObj Class::*>::value &&
+ std::is_base_of<Class, std::remove_reference_t<T>>::value;
template <typename MemObj, typename Class, typename T>
-static constexpr bool invoke_pmd_refwrap = std::is_member_object_pointer<MemObj Class::*>::value&&
+static constexpr bool invoke_pmd_refwrap =
+ std::is_member_object_pointer<MemObj Class::*>::value &&
is_reference_wrapper<std::remove_cv_t<std::remove_reference_t<T>>>;
template <typename MemObj, typename Class, typename T>
@@ -109,4 +112,4 @@ struct invoke_result<true, F, Args...> {
} // namespace internal
} // namespace cpp17
-#endif // LIB_STDCOMPAT_INCLUDE_LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_
+#endif // LIB_STDCOMPAT_INTERNAL_TYPE_TRAITS_H_