Inconsistent print() behaviour with std.string #76520
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
Printing strings from a c++ object in swift I was receiving only in the output
basic_string<CChar, char_traits<CChar>, allocator<CChar>>()
which was a drastic change from Swift 5.10, where I would receive
std.__1.string("contents of the string")
initialising a variable (
var t :std.string = "test"
) causes print to output the strings themselves,as in printing
contents of the string
Reproduction
Make a package using swift-tools 6.0
in cpp target:
then in an executable target import cpp one and:
uncomment the last line and run again.
Expected behavior
Either 5.10 behaviour, or at least a consistent behaviour overall.
Environment
swift-driver version: 1.115 Apple Swift version 6.0 (swiftlang-6.0.0.9.10 clang-1600.0.26.2)
Target: arm64-apple-macosx14.0
Additional information
No response
The text was updated successfully, but these errors were encountered: