Conversation
There was a problem hiding this comment.
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()tostring()for C++23 compatibility - Refactored header includes by moving
l2a_item.hfrom 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(); |
There was a problem hiding this comment.
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.
No description provided.