以上来源于: WordNet
Listing 2 contains a program that generates the compilation-time error message that happens when you try to add the wrong type of element to a generic collection - a List in this case.
在尝试向泛型集合(本例中为List)添加错误类型的元素时,清单2中的程序会生成编译时错误消息。
This element refers to the trace record type, and includes entry (1), exit (2), data (3), error (4), and fatal error (5).
该元素指向跟踪记录类型,包括entry (1)、exit (2)、data (3)、error(4)和fatal error (5)。
Note that int y(2.3) is allowed in C++0x; no type narrowing is assumed, and y equals 2 while int y{2.3} is plain error.
注意,在 C++0x 中允许 int y(2.3);由于不允许类型窄化,y 等于 2,而 int y{2.3} 是错的。
应用推荐