Skip to content

Commit

Permalink
third_party/fuchsia: Copybara import
Browse files Browse the repository at this point in the history
GitOrigin-RevId: e9e727d384934af95fca79b42ef3fe5004e9a58f
Change-Id: I44b2ddd3346f2258815e3f308aa303d6fb348abe
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/231293
Lint: Lint 🤖 <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Reviewed-by: Armando Montanez <[email protected]>
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
Fuchsia Authors authored and CQ Bot Account committed Aug 21, 2024
1 parent ea78a58 commit 6a840f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
#include <type_traits>
#include <utility>

#include "pw_preprocessor/compiler.h"

PW_MODIFY_DIAGNOSTICS_PUSH();
PW_MODIFY_DIAGNOSTIC_CLANG(ignored, "-Wshadow-field-in-constructor");

namespace fit {

// Forward declarations.
Expand Down Expand Up @@ -60,7 +65,7 @@ struct template_matcher {
};

template <typename T, template <typename...> class U, typename = bool>
struct is_match : decltype(template_matcher<U>::match(std::declval<T>())) {};
struct is_match : decltype(template_matcher<U>::match(std::declval<T>())){};

template <typename T, template <typename...> class U>
struct is_match<T, U, requires_conditions<std::is_void<T>>> : std::false_type {};
Expand Down Expand Up @@ -441,4 +446,6 @@ using storage = storage_type<storage_class_trait<E, Ts...>, E, Ts...>;
} // namespace internal
} // namespace fit

PW_MODIFY_DIAGNOSTICS_POP();

#endif // LIB_FIT_INTERNAL_RESULT_H_
6 changes: 6 additions & 0 deletions third_party/fuchsia/repo/sdk/lib/fit/include/lib/fit/result.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
// // fit::result<E>).

#include "pw_assert/assert.h"
#include "pw_preprocessor/compiler.h"

PW_MODIFY_DIAGNOSTICS_PUSH();
PW_MODIFY_DIAGNOSTIC_CLANG(ignored, "-Wshadow-field-in-constructor");

namespace fit {

Expand Down Expand Up @@ -803,4 +807,6 @@ constexpr bool operator>=(const T& lhs, const result<F, U>& rhs) {

} // namespace fit

PW_MODIFY_DIAGNOSTICS_POP();

#endif // LIB_FIT_RESULT_H_

0 comments on commit 6a840f0

Please sign in to comment.