Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

Updates project to C++23 standard and fixes iterator consistency bug.

Changes

  • C++ Standard: Updated from C++20 to C++23 in CMakeLists.txt and documentation
  • CMake Configuration: Removed broken export targets for fmt dependency (header-only library doesn't need complex export setup)
  • Bug Fix: Fixed const_iterator end() missing offset calculation, making it inconsistent with non-const version
// Before: const end() ignored offset, causing incorrect iteration
const_iterator end() const noexcept { return array_.get() + length_; }

// After: properly accounts for offset like non-const version
const_iterator end() const noexcept { return array_.get() + offset_ + length_; }

Native C++ Feature Review

Codebase already uses modern C++ extensively: concepts, ranges, three-way comparison, smart pointers, move semantics. Optional future enhancements:

  • std::ranges::fold_left (C++23) for reduce operations
  • Migration from fmt::format to std::format (though fmt often preferred)

No immediate replacements needed—the custom array intentionally provides JavaScript/Python-like API (push/pop/shift/unshift/slice/join) not found in standard containers.

Original prompt

Update the project to use the latest version of C++ and make sure the tests pass. Also, make sure that you don't use too many emojis (actually don't use any). Add a workflow for tests. If you see opportunity for any features that can be replaced with native c++ features, mention them


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 9, 2025 02:19
Co-authored-by: iwatakeshi <1505448+iwatakeshi@users.noreply.github.com>
Co-authored-by: iwatakeshi <1505448+iwatakeshi@users.noreply.github.com>
Co-authored-by: iwatakeshi <1505448+iwatakeshi@users.noreply.github.com>
Co-authored-by: iwatakeshi <1505448+iwatakeshi@users.noreply.github.com>
Copilot AI changed the title [WIP] Update project to latest C++ version and ensure tests pass Update to C++23 and fix const iterator bug Dec 9, 2025
Copilot AI requested a review from iwatakeshi December 9, 2025 02:30
@iwatakeshi iwatakeshi marked this pull request as ready for review December 9, 2025 02:39
@iwatakeshi iwatakeshi merged commit be2165e into master Dec 9, 2025
2 checks passed
@iwatakeshi iwatakeshi deleted the copilot/update-to-latest-cpp-version branch December 9, 2025 02:40
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