diff --git a/include/flux/core/inline_sequence_base.hpp b/include/flux/core/inline_sequence_base.hpp index 11554fa9..5fcd6f14 100644 --- a/include/flux/core/inline_sequence_base.hpp +++ b/include/flux/core/inline_sequence_base.hpp @@ -235,7 +235,7 @@ struct inline_sequence_base { (multipass_sequence && not infinite_sequence); [[nodiscard]] - constexpr auto chunk(std::integral auto chunk_sz) &&; + constexpr auto chunk(num::integral auto chunk_sz) &&; template requires multipass_sequence && @@ -251,7 +251,7 @@ struct inline_sequence_base { requires infinite_sequence || multipass_sequence; [[nodiscard]] - constexpr auto cycle(std::integral auto count) && requires multipass_sequence; + constexpr auto cycle(num::integral auto count) && requires multipass_sequence; [[nodiscard]] constexpr auto dedup() && @@ -259,7 +259,7 @@ struct inline_sequence_base { std::equality_comparable>; [[nodiscard]] - constexpr auto drop(std::integral auto count) &&; + constexpr auto drop(num::integral auto count) &&; template requires std::predicate> @@ -338,7 +338,7 @@ struct inline_sequence_base { constexpr auto scan_first(Func func) &&; [[nodiscard]] - constexpr auto slide(std::integral auto win_sz) && requires multipass_sequence; + constexpr auto slide(num::integral auto win_sz) && requires multipass_sequence; template requires multipass_sequence && @@ -364,10 +364,10 @@ struct inline_sequence_base { constexpr auto split_string(Pattern&& pattern) &&; [[nodiscard]] - constexpr auto stride(std::integral auto by) &&; + constexpr auto stride(num::integral auto by) &&; [[nodiscard]] - constexpr auto take(std::integral auto count) &&; + constexpr auto take(num::integral auto count) &&; template requires std::predicate> diff --git a/include/flux/op/chunk.hpp b/include/flux/op/chunk.hpp index b1dadac6..5124a49f 100644 --- a/include/flux/op/chunk.hpp +++ b/include/flux/op/chunk.hpp @@ -298,7 +298,7 @@ struct chunk_adaptor : inline_sequence_base> { struct chunk_fn { template [[nodiscard]] - constexpr auto operator()(Seq&& seq, std::integral auto chunk_sz) const + constexpr auto operator()(Seq&& seq, num::integral auto chunk_sz) const -> sequence auto { FLUX_ASSERT(chunk_sz > 0); @@ -312,7 +312,7 @@ struct chunk_fn { FLUX_EXPORT inline constexpr auto chunk = detail::chunk_fn{}; template -constexpr auto inline_sequence_base::chunk(std::integral auto chunk_sz) && +constexpr auto inline_sequence_base::chunk(num::integral auto chunk_sz) && { return flux::chunk(std::move(derived()), chunk_sz); } diff --git a/include/flux/op/cycle.hpp b/include/flux/op/cycle.hpp index bea9d9b6..b7c0572e 100644 --- a/include/flux/op/cycle.hpp +++ b/include/flux/op/cycle.hpp @@ -225,7 +225,7 @@ struct cycle_fn { template requires multipass_sequence [[nodiscard]] - constexpr auto operator()(Seq&& seq, std::integral auto count) const + constexpr auto operator()(Seq&& seq, num::integral auto count) const -> multipass_sequence auto { auto c = num::checked_cast(count); @@ -249,7 +249,7 @@ constexpr auto inline_sequence_base::cycle() && } template -constexpr auto inline_sequence_base::cycle(std::integral auto count) && +constexpr auto inline_sequence_base::cycle(num::integral auto count) && requires multipass_sequence { return flux::cycle(std::move(derived()), count); diff --git a/include/flux/op/drop.hpp b/include/flux/op/drop.hpp index d47d3123..f1ceb30c 100644 --- a/include/flux/op/drop.hpp +++ b/include/flux/op/drop.hpp @@ -64,7 +64,7 @@ struct drop_adaptor : inline_sequence_base> { struct drop_fn { template [[nodiscard]] - constexpr auto operator()(Seq&& seq, std::integral auto count) const + constexpr auto operator()(Seq&& seq, num::integral auto count) const { auto count_ = num::checked_cast(count); if (count_ < 0) { @@ -81,7 +81,7 @@ struct drop_fn { FLUX_EXPORT inline constexpr auto drop = detail::drop_fn{}; template -constexpr auto inline_sequence_base::drop(std::integral auto count) && +constexpr auto inline_sequence_base::drop(num::integral auto count) && { return flux::drop(std::move(derived()), count); } diff --git a/include/flux/op/slide.hpp b/include/flux/op/slide.hpp index 9cdcf352..45ec9177 100644 --- a/include/flux/op/slide.hpp +++ b/include/flux/op/slide.hpp @@ -128,7 +128,7 @@ struct slide_fn { FLUX_EXPORT inline constexpr auto slide = detail::slide_fn{}; template -constexpr auto inline_sequence_base::slide(std::integral auto win_sz) && +constexpr auto inline_sequence_base::slide(num::integral auto win_sz) && requires multipass_sequence { FLUX_ASSERT(win_sz > 0); diff --git a/include/flux/op/stride.hpp b/include/flux/op/stride.hpp index 5045773f..001a523a 100644 --- a/include/flux/op/stride.hpp +++ b/include/flux/op/stride.hpp @@ -254,7 +254,7 @@ struct stride_adaptor : inline_sequence_base> { struct stride_fn { template [[nodiscard]] - constexpr auto operator()(Seq&& seq, std::integral auto by) const + constexpr auto operator()(Seq&& seq, num::integral auto by) const { FLUX_ASSERT(by > 0); return stride_adaptor>(FLUX_FWD(seq), @@ -267,7 +267,7 @@ struct stride_fn { FLUX_EXPORT inline constexpr auto stride = detail::stride_fn{}; template -constexpr auto inline_sequence_base::stride(std::integral auto by) && +constexpr auto inline_sequence_base::stride(num::integral auto by) && { return flux::stride(std::move(derived()), by); } diff --git a/include/flux/op/take.hpp b/include/flux/op/take.hpp index 44b52f79..4142d32f 100644 --- a/include/flux/op/take.hpp +++ b/include/flux/op/take.hpp @@ -148,7 +148,7 @@ struct take_adaptor : inline_sequence_base> struct take_fn { template [[nodiscard]] - constexpr auto operator()(Seq&& seq, std::integral auto count) const + constexpr auto operator()(Seq&& seq, num::integral auto count) const { auto count_ = num::checked_cast(count); if (count_ < 0) { @@ -164,7 +164,7 @@ struct take_fn { FLUX_EXPORT inline constexpr auto take = detail::take_fn{}; template -constexpr auto inline_sequence_base::take(std::integral auto count) && +constexpr auto inline_sequence_base::take(num::integral auto count) && { return flux::take(std::move(derived()), count); } diff --git a/include/flux/source/array_ptr.hpp b/include/flux/source/array_ptr.hpp index 789658d7..85b41cb4 100644 --- a/include/flux/source/array_ptr.hpp +++ b/include/flux/source/array_ptr.hpp @@ -158,7 +158,7 @@ namespace detail { struct make_array_ptr_unchecked_fn { template requires (std::is_object_v && !std::is_abstract_v) - constexpr auto operator()(T* ptr, std::integral auto size) const -> array_ptr + constexpr auto operator()(T* ptr, num::integral auto size) const -> array_ptr { return array_ptr(ptr, num::checked_cast(size)); } diff --git a/include/flux/source/repeat.hpp b/include/flux/source/repeat.hpp index 32568218..79725b12 100644 --- a/include/flux/source/repeat.hpp +++ b/include/flux/source/repeat.hpp @@ -125,7 +125,7 @@ struct repeat_fn { template requires std::movable> - constexpr auto operator()(T&& obj, std::integral auto count) const + constexpr auto operator()(T&& obj, num::integral auto count) const { auto c = num::checked_cast(count); if (c < 0) {