C++ 程序设计语言(特别版)(英文影印版)的笔记(41)
>我来写笔记
按有用程度 按页码先后 最新笔记
-
第372页
As always,the error handler itself can use the standard set of fundamental techniques for error reporting and recovery. Each time an exception is passed along to caller, the view of what went wrong changes.If suitable information is passed along in the exception, the amount of information available to deal with the problem could increase. In other words, the fundanmental aim of the error-handling... (更多)2012-04-24 21:17:25 回应
-
第347页
Alias of parameterizes and Inheritance: what virtual functions provide is called run-time polymorphism , and what templates offer is called compile-time polymorphism or parametric polymorphism. How to choose between these two techniques? In either case, we manipulate objects that share a common set of operations. If no hierarchical relationship is required between these objects, they ar... (更多)2012-02-17 09:10:32 回应
-
第418页
.A pointer to a member is a value that identifies a member of class.Pointers to members look like pointer type,but it is not an ordinary pointer. 1. Ordinary pointer and pointers to members could be implicitly converted to null constant pointer both. 2. Ordinary pointer and pointers to members could be implicitly converted to bool type both. 3. Ordinary could be implicitly converted to... (更多)2012-02-10 09:52:49 回应
-
第336页
When both ordinary function and template function join in the overloading resolution,guess what happans? I think one of the possibilities is going to be a gork. The brief rule is as follows: 1. Find the set of function template specializations that will take part in overload res-olution; 2. Consider only the most specialized template function in the following steps. 3. Do overload res... (更多)2012-01-11 19:17:13 回应
-
第300页
The name look-up and overloading-resolution are the two leading complicated thing when we write program using C++,although wo may not notice that.We can find this in class-deriving, function or operator overloading, variable definition or declaration,almost everywhere. It is so complicated that I cannot clearly understand all this things. Oh well, Maybe I get it one day, and pigs might fly... (更多)2011-12-16 13:12:54 回应
-
第264页
The operator=(assignment), &(address-of), ,(comma) have predifined meaning when applied to class object. Some words about =(assignment): The assignment operator could be implicitly defined by complier.The memberwise[ http://book.douban.com/annotation/15504159/ ] copy is done when using implicitly-defined assignment operator. The assignment operator is used by object which has been co... (更多)2011-12-06 10:46:26 回应
-
第263页
There are three operators which cann't be overloaded. <1> :: [scope resoultion] <2> . [member selection] <3> .* [member selection by pointer to member] The overloading of four operator below could be only nonstatic member class <1> -> [Structure dereference ] <2> = [assignment ] <3> [] [subscript ] <4> () [b... (更多)2011-12-04 20:54:55 回应
-
第245页
In some condition,compiler will implicitly define copy constructor. [12.8]The implicitly-defined copy constructor for a class perform a memberwise copy of its subobjects.The order of copying is the same as the order of initialization of bases and members in a user-defined constructor.Each subobject is copied in the manner appropriate to its type: ------ if the subobject is of class type,the copy... (更多)2011-11-24 18:05:22 回应
-
第247页
Some details about member-initializer-list [12.6.2.2]Names in a mem-initializer-list are looked up in the scope of the constructor's class and, if not found in that scope, are looked up in the scope containing the constructor's definition. Unless the mem-initializer-id names a nonstatic data member of the constructor's class or a direct or virtual base of that class, the mem-initializer is ill-fo... (更多)2011-11-22 21:37:39 回应

