From 7f9f65f9f5b8c467b023d5ce1130807943c0fed3 Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 13 Sep 2025 07:12:15 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #66 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Ranges/issues/66 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..13dd1c8 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Ranges/issues/66 +Your prepared branch: issue-66-a32b9223 +Your prepared working directory: /tmp/gh-issue-solver-1757736731223 + +Proceed. \ No newline at end of file From 30796b9c477afefff72b3187ff6fbf65ff33a7eb Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 13 Sep 2025 07:14:35 +0300 Subject: [PATCH 2/3] Fix Range class template deduction guide to support single parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous deduction guide required at least two parameters (T, U...), but Range has a single-parameter constructor for creating ranges with the same minimum and maximum value. This change fixes the deduction guide to use variadic template parameters (T...) allowing both single and multiple parameter deduction. Fixes issue #66 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- cpp/Platform.Ranges/Range[T].h | 4 ++-- examples/test_deduction_guide.cpp | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 examples/test_deduction_guide.cpp diff --git a/cpp/Platform.Ranges/Range[T].h b/cpp/Platform.Ranges/Range[T].h index d575556..031f6c8 100644 --- a/cpp/Platform.Ranges/Range[T].h +++ b/cpp/Platform.Ranges/Range[T].h @@ -72,8 +72,8 @@ public: template requires std::convertible_to constexpr explicit(not Internal::implicit_convertible_to) operator Range() const noexcept(noexcept(static_cast(Minimum))) { return {static_cast(Minimum), static_cast(Maximum)}; } }; - template - Range(T, U...) -> Range>; + template + Range(T...) -> Range>; } namespace std diff --git a/examples/test_deduction_guide.cpp b/examples/test_deduction_guide.cpp new file mode 100644 index 0000000..f71d828 --- /dev/null +++ b/examples/test_deduction_guide.cpp @@ -0,0 +1,22 @@ +#include "../cpp/Platform.Ranges/Platform.Ranges.h" +#include +#include + +int main() +{ + // Test single parameter deduction + auto range1 = Platform::Ranges::Range(5); + static_assert(std::is_same_v>); + + // Test two parameter deduction + auto range2 = Platform::Ranges::Range(1, 10); + static_assert(std::is_same_v>); + + // Test mixed types deduction + auto range3 = Platform::Ranges::Range(1, 10.5); + static_assert(std::is_same_v>); + + std::cout << "All deduction guide tests passed!" << std::endl; + + return 0; +} \ No newline at end of file From 511e51a6ed7f1967e0af2e79a81e50963ed946d8 Mon Sep 17 00:00:00 2001 From: konard Date: Sat, 13 Sep 2025 07:15:03 +0300 Subject: [PATCH 3/3] Remove CLAUDE.md - Claude command completed --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 13dd1c8..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Ranges/issues/66 -Your prepared branch: issue-66-a32b9223 -Your prepared working directory: /tmp/gh-issue-solver-1757736731223 - -Proceed. \ No newline at end of file