c++_primer_exercise_1632_1633_1634
来源:互联网 发布:颜真卿书法 知乎 编辑:程序博客网 时间:2024/04/30 06:10
Exercise 16.32:
The compiler examines the types of the argument that were specified using a template parameter. It automatically instantiates a version of the function with those types or values bound to the template paramter.
Exercise 16.33:
const conversions: A function parameter that is a reference(or pointer) to a const can be passed a reference(or pointer) to a nonconst object.
Array- or function-to-pointer conversions: If the function parameter is not a reference type, then the normal pointer conversion will be applied to arguments of array or function type. An array argument will be converted to a pointer to its first element. Similarly, a function argument will be converted to the function's type.
Exercise 16.34:
(a) illegal. When the parameter is a reference, the arrays are not converted to pointers. one is converted to "a reference to const char [3]", and the other is converted to "a reference to const char [6]".
(b) legal.
- c++_primer_exercise_1632_1633_1634
- c
- c
- c
- c
- C
- c
- c
- c
- C+
- c
- C
- c
- c
- c
- C
- C
- c
- canvas基础
- 需求跟踪矩阵的作用
- 【C语言】[其他] :code, data, idata, xdata, bdata, edata, hdata等,代表的意思
- 创业者必看(马云语录)
- NSArray的API
- c++_primer_exercise_1632_1633_1634
- 清澈如杨柳
- 早该知道的7个JavaScript技巧
- LeetCode: Palindrome Number
- [Linux学习笔记]常用命令学习-01
- API自己练习
- Best Time to Buy and Sell Stock
- 很简单的事看得非常复杂
- 基于 HTTP 长连接的“服务器推”技术-Comet