Working with a C++ class named String

I am importing a C++ library I didn't write into my swift project using the new interop features. This library includes a class named ::String which Swift happily maps to the name String and lets me use... but then I no longer have any access to Swift's String type! Is there any way I can namespace this import or otherwise resolve this without having to edit the C++ source for all uses of this class?

Swift.String doesn't work?

Perfect! This is what I was looking for, thanks.

1 Like