简体   繁体   中英

Are C++ initializers called in Objective-C synthesized properties?

Are C++ initializers called in Objective-C synthesized properties? Meaning if I write a custom initializer for creation from another object of the same type (C++) does the synthesized property setter call that initializer?

I assume by initializer you actually mean a C++ constructor. In a synthesized setter the copy constructor for the C++ object is called.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM