mirror of
https://github.com/fmtlib/fmt.git
synced 2026-08-03 20:14:20 +02:00
Cleanup CI config
This commit is contained in:
+9
-2
@@ -710,10 +710,17 @@ struct codec_mask {
|
||||
int except = 0;
|
||||
};
|
||||
|
||||
// A named functor instead of a lambda to avoid -Wsubobject-linkage: a lambda
|
||||
// gives the filter_view type internal linkage, which propagates to the
|
||||
// formatter base class via format_as.
|
||||
struct not_equal {
|
||||
int value;
|
||||
bool operator()(int c) const { return c != value; }
|
||||
};
|
||||
|
||||
auto format_as(codec_mask mask) {
|
||||
// Careful not to capture param by reference here, it will dangle.
|
||||
return codec_mask::codecs |
|
||||
std::views::filter([mask](auto c) { return c != mask.except; });
|
||||
std::views::filter(not_equal{mask.except});
|
||||
}
|
||||
} // namespace views_filter_view_test
|
||||
|
||||
|
||||
Reference in New Issue
Block a user