swift
7b6b576d - [cxx-interop] Avoid trying to instantiate copy constructor of `std::optional<NonCopyable>`

Commit
262 days ago
[cxx-interop] Avoid trying to instantiate copy constructor of `std::optional<NonCopyable>` In libc++, `std::optional` inherits from several mixin base types. Some of those base types do not declare a deleted copy constructor for non-copyable value types, which works fine because clients are not supposed to use those base types directly from C++. Swift, however, imports all of the transitive base types when importing a C++ type. As part of this, ClangImporter will attempt to instantiate e.g. `std::__optional_copy_assign_base<NonCopyable>`, and will fail with a hard error while doing so. rdar://152718041 (cherry picked from commit 124055a51a1e5c0900b2c38896264fde8d1c397b)
Author
Committer
Parents
Loading