Skip to content

Commit

Permalink
filter
Browse files Browse the repository at this point in the history
  • Loading branch information
eggrobin committed Mar 30, 2024
1 parent 7ac2c28 commit f0725dc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions base/cpuid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ std::string ProcessorBrandString() {
}

std::string CPUFeatures() {
return absl::StrJoin(
std::ranges::transform_view(CPUIDFlags(), &CPUIDFeatureFlag::name), " ");
return absl::StrJoin(CPUIDFlags() |
std::views::filter(&CPUIDFeatureFlag::IsSet) |
std::views::transform(&CPUIDFeatureFlag::name),

Check warning on line 92 in base/cpuid.cpp

View workflow job for this annotation

GitHub Actions / check-cpp

build/include_what_you_use

Add #include <algorithm> for transform
" ");
}

} // namespace internal
Expand Down

0 comments on commit f0725dc

Please sign in to comment.