Skip to content

Conversation

@Wentzell
Copy link
Member

@Wentzell Wentzell commented Dec 2, 2025

Summary

  • Introduces C++23 multi-argument operator[] syntax (e.g., A[i, j, k]) as the primary indexing interface
  • Makes operator() delegate to operator[] for backward compatibility
  • Updates all array-like types: basic_array, basic_array_view, array_adapter, expr, expr_unary, and expr_call

Changes

  • Require C++23 (cxx_std_23) and remove deprecated comma-subscript warnings
  • Rename internal call<>() helper to subscript<>() for clarity
  • Full feature parity with operator(): integers, ranges, range::all, ellipsis, and CLEF lazy placeholders all work
  • Add comprehensive tests for the new subscript operator

Test plan

  • All existing tests pass (119/119)
  • New MultiDimensionalSubscriptOperator test covers element access, CLEF, slicing, ellipsis, and expression templates

- Require C++23 and remove deprecated comma-subscript warnings
- Add variadic operator[] to basic_array and basic_array_view
- Rename call<>() helper to subscript<>() for clarity
- Make operator[] the primary implementation with operator() delegating to it
- Update expression templates (expr, expr_unary) consistently
- Add variadic operator[] to expr_call and array_adapter
- Add comprehensive tests for the new subscript operator

Co-Authored-By: Claude <[email protected]>
@Wentzell Wentzell requested a review from Thoemi09 December 2, 2025 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants