-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Replace C++17 standard library reimplementations with std equivalents #7349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes. |
…ions Co-authored-by: ssheorey <[email protected]>
Co-authored-by: ssheorey <[email protected]>
Co-authored-by: ssheorey <[email protected]>
|
@copilot Remove the custom "optional" implementation and instead directly use std namespace functions in the whole Open3D codebase. (e.g. replace utility::optional with std::optional). |
…remove Optional.h Co-authored-by: ssheorey <[email protected]>
Done. Replaced all |
…/replace-open3d-utility-features
|
@copilot /cpp/open3d/core/TensorKey.h:20:53: error: could not convert ‘{}’ from ‘’ to ‘const std::nullopt_t’ |
…7 compatibility Co-authored-by: ssheorey <[email protected]>
Fixed. The issue was that |
…hub.com/isl-org/Open3D into copilot/replace-open3d-utility-features
ssheorey
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. macOS CI failure is unrelated and is fixed in main.
Replace C++17 Standard Library Reimplementations ✅
This PR successfully identifies and replaces all custom reimplementations of C++17 standard library features in the
cpp/open3d/utility/folder with their standard library equivalents.📋 Completed Replacements
1. ✅ utility::optional → std::optional (C++17) - FULLY MIGRATED
Changes:
cpp/open3d/utility/Optional.hentirelyutility::optional→std::optional(171 occurrences)utility::nullopt→std::nulloptutility::make_optional→std::make_optionalutility::in_place→std::in_place#include "open3d/utility/Optional.h"→#include <optional>Files Modified: 50 files across the codebase
cpp/open3d/core/(15 files)cpp/open3d/geometry/(4 files)cpp/open3d/pipelines/(7 files)cpp/open3d/t/geometry/(15 files)cpp/open3d/t/pipelines/(5 files)cpp/open3d/t/io/(1 file)Bug Fix:
TensorKey.h: Replacedstd::nullopt_t::init()(custom implementation) withstd::nullopt(C++17 standard)Impact:
2. ✅ std::experimental::filesystem → std::filesystem (C++17)
File:
cpp/open3d/utility/FileSystem.cppChanges:
3. ✅ utility::Overloaded → C++17 Simplified Version
File:
cpp/open3d/utility/Overload.hChanges:
📊 Summary Statistics
Total Changes:
✅ Testing & Validation
Verification:
<optional>instead of custom header💡 Benefits
Status: ✅ Ready for review - All utility::optional references replaced, Optional.h removed, compilation errors fixed
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.