-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
third_party/fuchsia: Copybara import of the fit library
- 1a2796efccc86f400d6fc3044b1c614b4747bdeb [fit] Ergonomic conversion from fit::result<E, T> to zx::... - a01ba65d3b1ea856f8c952fc2fb4aa74a7d22137 [fit] Use decltype(auto) in make_the_call - 1db06d2d682ae5d584a3eaad369116a145966573 [sdk][fit] Support operator-> forwarding for pointer resu... - bd75a17d8f441417a026430545a9deaa14eb3a86 Reland "Reland "[driver_manager] Hang composite devices o... - fcbd029622473b6f9882cd78903d50c651709349 Revert "Reland "[driver_manager] Hang composite devices o... - 71eb8951dccb88bf8e9588273961ed12f4f24aa7 Reland "[driver_manager] Hang composite devices off parent" - 241bd1d5d6648ac39574614c475227201ea89eca Revert "[driver_manager] Hang composite devices off parent" - 7f184779e7866768ca1d1017e25a9d1b29975e9e [driver_manager] Hang composite devices off parent GitOrigin-RevId: 1a2796efccc86f400d6fc3044b1c614b4747bdeb Change-Id: Ic7930b1123aecb3971887ac8e4ce32cb532814bb Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/126693 Reviewed-by: Wyatt Hepler <[email protected]> Commit-Queue: Ben Lawson <[email protected]>
- Loading branch information
Fuchsia Authors
authored and
CQ Bot Account
committed
Jan 20, 2023
1 parent
b49bee7
commit 643eb5c
Showing
7 changed files
with
159 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
third_party/fuchsia/repo/sdk/lib/stdcompat/include/lib/stdcompat/functional.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Copyright 2021 The Fuchsia Authors. All rights reserved. | ||
// 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_FUNCTIONAL_H_ | ||
#define LIB_STDCOMPAT_INCLUDE_LIB_STDCOMPAT_FUNCTIONAL_H_ | ||
|
||
#include "internal/functional.h" | ||
|
||
namespace cpp20 { | ||
|
||
// This version is always constexpr-qualified, with no other changes from C++17. | ||
|
||
#if defined(__cpp_lib_invoke) && defined(__cpp_lib_constexpr_functional) && \ | ||
__cpp_lib_invoke >= 201411L && __cpp_lib_constexpr_functional >= 201907L && \ | ||
!defined(LIB_STDCOMPAT_USE_POLYFILLS) | ||
|
||
using std::invoke; | ||
|
||
#else // Provide invoke() polyfill | ||
|
||
template <typename F, typename... Args> | ||
constexpr cpp17::invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) noexcept( | ||
cpp17::is_nothrow_invocable_v<F, Args...>) { | ||
return ::cpp17::internal::invoke(std::forward<F>(f), std::forward<Args>(args)...); | ||
} | ||
|
||
#endif // __cpp_lib_invoke >= 201411L && __cpp_lib_constexpr_functional >= 201907L && | ||
// !defined(LIB_STDCOMPAT_USE_POLYFILLS) | ||
|
||
#if defined(__cpp_lib_bind_front) && __cpp_lib_bind_front >= 201907L && \ | ||
!defined(LIB_STDCOMPAT_USE_POLYFILLS) | ||
|
||
using std::bind_front; | ||
|
||
#else // Provide bind_front() polyfill | ||
|
||
template <typename F, typename... Args> | ||
constexpr ::cpp20::internal::front_binder_t<F, Args...> bind_front(F&& f, Args&&... args) noexcept( | ||
cpp17::is_nothrow_constructible_v<::cpp20::internal::front_binder_t<F, Args...>, | ||
cpp17::in_place_t, F, Args...>) { | ||
return ::cpp20::internal::front_binder_t<F, Args...>(cpp17::in_place, std::forward<F>(f), | ||
std::forward<Args>(args)...); | ||
} | ||
|
||
#endif // __cpp_lib_bind_front >= 201907L && !defined(LIB_STDCOMPAT_USE_POLYFILLS) | ||
|
||
} // namespace cpp20 | ||
|
||
#endif // LIB_STDCOMPAT_INCLUDE_LIB_STDCOMPAT_FUNCTIONAL_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters