C++ FAQ Memo

        c++ faq ----------- comp.lang.c++

一、section[10] constructor

          10.9 ---------- whether the complier optimize away the tempory object when a function return a object by value  and how

          10.21---------- Why am I getting an error after declaring a Foo object via Foo x(Bar()) / Foo x()?


二、section[11] decostuctor  (never explicitly call a deconstructor)

         11.6 ----------- What if I want a local to "die" before the close } of the scope in which it was created? Can I call a destructor on a local if I really want to?

                                   

三、section[36] serialization and unserialization


四、Others

         39.6 ----------- What should be done with macros that need to paste two tokens together?

  use two-layer helper maros 


         39.14 ---------- Why can't I put a forward-declared class in a std::vector<>?

                                      1.  Because the std::vector<> template needs to know the sizeof() its contained elements, plus the std::vector<> probably

                                  accesses members of the contained elements (such as the copy constructor, the destructor, etc.).

                                      2. Whenever you use a class as a template parameter, the declaration of that class must be complete and not simply forward declared

         40.1 ------------ How can I generate HTML documentation for my classes?



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值