快捷搜索:   服务器  安全  linux 安全  MYSQL  dedecms

嵌套对象的copy-constructor(2)


    inside_withCC(): inside_withCC_object_count = 2
    withCC copy-constructions function is called
    withCC(const withCC&): withCC_object_count = 2
    contents of c2: composite()

    可见,如果母对象没有定义X(X&),则母对象采用位拷贝,不掉用任何构造函数,子对象中如果有现式的定义X(X&)的,则调用之,否则采用位拷贝。

顶(0)
踩(0)

您可能还会对下面的文章感兴趣:

最新评论