import Ch26Kit import Foundation @main struct Ch26Demo { static func main() { var counter = Counter(start: 10) print("[26.1] C++ increment = \(counter.increment())/\(counter.value)") counter.add(5) print("[26.1] C++ add = \(counter.value)") print("[26.1] C++ 自由函数 = \(CxxMath.multiply(6, 7))") print("[26.2] KVO 变化 = \(ObjectiveCLab.observeTheme())") print("[26.3] responds(to:) = \(ObjectiveCLab.respondsToDescribe())") print("[26.3] @objc 方法 = \(ObjectiveCLab.callDescribe())") print("[26.5] MemoryLayout = \(MemoryLayout.size) 字节") print("[26.5] MemoryLayout = \(MemoryLayout.size) 字节") } }