Interop: Use of c++20 type char8_t confuses the swift compiler and Xcode #68726
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
c++ interop
Feature: Interoperability with C++
Description
An imported cxx module (clang module) with a struct that uses the type char8_t has its char8_t member dropped on the floor.
Steps to reproduce
In this fork of the swift-cmake-examples:
https://github.com/ADKaster/swift-cmake-examples/tree/xcode-15/Interop
I have a CMake project that uses c++20, sets the interop flag to true, has a C++20-only feature in the C++ component (a char8_t member).
When I generate an Xcode project
and open that Xcode project in Xcode Version 15.0 (15A240d), I can set the interop mode to C++, and set the C++ language standard to C++20 (or gnu++20), and the project builds.
or
Build in Xcode GUI
Expected behavior
Building and running the project gives an executable
Ethat when run, printsVersion(major: 1, minor: 0, patch: 0)However, there are two bugs instead:
Environment
1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
Target: arm64-apple-macosx13.0
Xcode 15.0
Build version 15A240d
I reported this on apple developer a few months ago but didn't get a reply that actually helped.
https://developer.apple.com/forums/thread/735186
The text was updated successfully, but these errors were encountered: