mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Since this is a C++ stdlib type we need make sure that any overloads that use it are preferred over custom types that also conform to `ExpressibleByStringLiteral` when argument is a string literal. This is important for operators like `==` which could be heterogenous and have a custom C++ type that conforms to `ExpressibleByStringLiteral` on either side together with `std.string` i.e. `==(std.string, const CustomString &)`, such overloads should only be selected if argument passed to `CustomString` is non-literal because literals are convered by a stdlib `==(std.string, std.string)` overload.
9.1 KiB
9.1 KiB