Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/iceberg/expression/literal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ Result<Literal> LiteralCaster::CastTo(const Literal& literal,
std::size_t LiteralValueHash::operator()(const Literal::Value& value) const noexcept {
return std::visit(
[](const auto& v) -> std::size_t {
using T = std::decay_t<decltype(v)>;
using T = std::remove_cvref_t<decltype(v)>;

constexpr size_t kHashPrime = 0x9e3779b9;

Expand Down
6 changes: 3 additions & 3 deletions src/iceberg/manifest/manifest_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ template <typename Container, typename Accessor, typename... Args>
requires std::ranges::forward_range<Container>
Status ParseIntegerField(const ArrowArrayView* array_view, Container& container,
Accessor accessor, Args&&... args) {
using T = unwrap_optional_t<std::decay_t<
using T = unwrap_optional_t<std::remove_cvref_t<
std::invoke_result_t<Accessor&, std::ranges::range_reference_t<Container>>>>;
return ParseField(
[](const ArrowArrayView* view, int64_t row_idx) {
Expand Down Expand Up @@ -165,11 +165,11 @@ void ParseVectorField(Transfer transfer, const ArrowArrayView* view, int64_t len

template <typename Container, typename Accessor>
requires std::ranges::forward_range<Container> &&
std::ranges::range<std::decay_t<std::invoke_result_t<
std::ranges::range<std::remove_cvref_t<std::invoke_result_t<
Accessor&, std::ranges::range_reference_t<Container>>>>
void ParseIntegerVectorField(const ArrowArrayView* view, int64_t length,
Container& container, Accessor accessor) {
using T = unwrap_optional_t<std::ranges::range_value_t<std::decay_t<
using T = unwrap_optional_t<std::ranges::range_value_t<std::remove_cvref_t<
std::invoke_result_t<Accessor&, std::ranges::range_reference_t<Container>>>>>;
return ParseVectorField(
[](const ArrowArrayView* v, int64_t offset) {
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/snapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool SnapshotRef::Tag::Equals(const SnapshotRef::Tag& other) const {
SnapshotRefType SnapshotRef::type() const noexcept {
return std::visit(
[&](const auto& retention) -> SnapshotRefType {
using T = std::decay_t<decltype(retention)>;
using T = std::remove_cvref_t<decltype(retention)>;
if constexpr (std::is_same_v<T, Branch>) {
return SnapshotRefType::kBranch;
} else {
Expand Down
10 changes: 5 additions & 5 deletions src/iceberg/test/matchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class HasValueMatcher {
template <typename MatcherT>
auto HasValue(MatcherT&& matcher) {
return ::testing::MakePolymorphicMatcher(
HasValueMatcher<std::decay_t<MatcherT>>(std::forward<MatcherT>(matcher)));
HasValueMatcher<std::remove_cvref_t<MatcherT>>(std::forward<MatcherT>(matcher)));
}

// Overload for the common case where we just want to check for presence of any value
Expand Down Expand Up @@ -200,15 +200,15 @@ class ResultMatcher {
// Factory function for ResultMatcher for values
template <typename MatcherT>
auto ResultIs(MatcherT&& matcher) {
return ::testing::MakePolymorphicMatcher(
ResultMatcher<std::decay_t<MatcherT>>(true, std::forward<MatcherT>(matcher)));
return ::testing::MakePolymorphicMatcher(ResultMatcher<std::remove_cvref_t<MatcherT>>(
true, std::forward<MatcherT>(matcher)));
}

// Factory function for ResultMatcher for errors
template <typename MatcherT>
auto ErrorIs(MatcherT&& matcher) {
return ::testing::MakePolymorphicMatcher(
ResultMatcher<std::decay_t<MatcherT>>(false, std::forward<MatcherT>(matcher)));
return ::testing::MakePolymorphicMatcher(ResultMatcher<std::remove_cvref_t<MatcherT>>(
false, std::forward<MatcherT>(matcher)));
}

// Evaluate `rexpr` which should return a Result<T, Error>.
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/test/visit_type_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ TEST_P(TypeTest, VisitTypePrintToString) {

TEST_P(TypeTest, VisitTypeReturnNestedTypeId) {
auto visitor = [&](auto&& type) -> Result<TypeId> {
using Type = std::decay_t<decltype(type)>;
using Type = std::remove_cvref_t<decltype(type)>;
// Check if the type is a nested type
if constexpr (std::is_base_of_v<NestedType, Type>) {
return type.type_id();
Expand Down
Loading