Skip to content

Comments

Update to c++23#237

Open
isteinbrecher wants to merge 2 commits intodevelopfrom
update-std
Open

Update to c++23#237
isteinbrecher wants to merge 2 commits intodevelopfrom
update-std

Conversation

@isteinbrecher
Copy link
Owner

No description provided.

@isteinbrecher isteinbrecher changed the base branch from main to develop February 6, 2026 09:33
@isteinbrecher isteinbrecher requested a review from Copilot February 6, 2026 09:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the C++ language standard from C++17 to C++23 across build configurations and updates code to be compatible with C++23. The PR addresses breaking changes in the standard library, specifically how std::filesystem::path string conversion methods behave in C++20 and later.

Changes:

  • Updated build configurations for both Xcode and Visual Studio projects to use C++23
  • Changed std::filesystem::path::u8string() to string() for C++23 compatibility
  • Refactored header includes by moving l2a_item.h from a forward declaration pattern to a direct include

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
LaTeX2AI.xcodeproj/project.pbxproj Updated CLANG_CXX_LANGUAGE_STANDARD from c++17 to c++23 for both Debug and Release configurations
LaTeX2AI.vcxproj Updated LanguageStandard from stdcpp17 to stdcpp23 for both Debug and Release configurations
src/utils/l2a_file_system.cpp Changed path.filename().u8string() to string() on line 304 for C++23 compatibility
src/l2a_annotator.h Replaced forward declaration of L2A::Item with direct include of l2a_item.h
src/l2a_annotator.cpp Removed redundant include of l2a_item.h since it's now included in the header

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (std::filesystem::is_regular_file(dir_entry))
{
const auto file_name = dir_entry.path().filename().u8string();
const auto file_name = dir_entry.path().filename().string();
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from u8string() to string() on line 304 is correct for C++23, but there's an inconsistency: line 59 in the same file still uses u8string() for Windows builds in the FilePathStdToAi function. In C++20 and later, std::filesystem::path::u8string() returns std::u8string (not std::string), which requires explicit conversion. The change to string() is appropriate, but the same change should be applied to line 59 for consistency and to avoid compilation issues on Windows.

Copilot uses AI. Check for mistakes.
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.

1 participant