Skip to content

[cxx-interop] Add a SWIFT_MUTATING macro to <swift/bridging> header #66322

Closed
@hyp

Description

@hyp

This macro is needed to allow users to annotate constant C++ member functions that do mutate the object, e.g. using a mutable C++ field. This annotation makes Swift import them as mutating methods then.

Note: the compiler already supports it using the swift_attr("mutating") attribute, now we just need a macro. You can use __attribute__((swift_attr("mutating"))) for now to workaround this issue.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.c++ interopFeature: Interoperability with C++swift 5.9triage neededThis issue needs more specific labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions