[cxx-interop] Consider mapping C++ nullopt_t ctors to ExpressibleByNilLiteral conformance #72796
Labels
c++ interop
Feature: Interoperability with C++
compiler
The Swift compiler in itself
feature
A feature request or implementation
Motivation
C++ codebases often define types that can store null as their state. Such types can commonly be initialized from
nullptr
.Proposed solution
ClangImporter could map the nullopt C++ constructor to Swift's
init(nilLiteral: ())
and automatically conform the type toExpressibleByNilLiteral
.Alternatives considered
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: