Files
swift-mirror/test/Interop/Cxx/reference/Inputs/reference-silgen-cxx-objc-ctors+init.h
Puyan Lotfi 84a69c4143 [C++-Interop] Import const &T function parameters as @in_guaranteed
When passing value types as a const-ref to a C++ API, ensure that the
caller is tasked with handling the lifetime of the instance passed in.
2022-09-12 16:27:27 -04:00

16 lines
342 B
Objective-C

@interface NSObject
@end
struct IntWrapper {
int value;
IntWrapper() = delete;
IntWrapper(const int &value): value(value) {};
};
@interface ObjCSwiftBridge : NSObject
- (instancetype)init __attribute__((unavailable));
- (instancetype)initWithEmbedded:(const IntWrapper &)embedded __attribute__((objc_designated_initializer));
@end