1
A
回答
2
是的。他们都是平等的。理解const的最好方法是将其读为应用于留下的令牌(除非它是最左侧的令牌 - 在这种情况下,它适用于右侧的即时令牌)。
参见https://isocpp.org/wiki/faq/const-correctness#overview-const
相关问题
- 1. “std :: string const”与“const std :: string”
- 2. std ::向量const指针const对象不能编译
- 3. 向量中的C++ const迭代器
- 4. C++的std ::向量构造
- 5. 多维的std ::向量(C++)
- 6. C++ - 返回常量对象的常量向量const的向量
- 7. 包装std ::向量,向量,C++ SWIG Python
- 8. std :: const中的常量参数:: remove_if
- 9. C++ const std :: string赋值
- 10. 地图C++结构的std ::向量C#
- 11. std :: unique_locks的std :: vector向量
- 12. 化std :: swap用的std ::向量在结构C++
- 13. 的std ::向量的目标C方法
- 14. C++新的std ::指针向量
- 15. C++的std ::向量::明确()崩溃
- 16. C++ std :: array到shared_ptr的向量
- 17. C++比较为const char *到的std :: string
- 18. static const std :: vector
- 19. 为什么allocator在向量中是const?
- 20. 在VC++ 2010中传入const向量
- 21. C++的std ::向前[]
- 22. 向下转换const std :: list <const unique_ptr <Base>>
- 23. 的std ::向量:如何返回指针向量C++
- 24. C++ std :: transform向量对 - >第一个到新的向量
- 25. C++:std ::具有任意签名的std :: function的向量
- 26. 为什么在C++ 17中的std :: variant允许std :: variant <int,const int>
- 27. c + +让与的std ::向量或std一个banlist ::地图
- 28. 的std ::阵VS C-阵列VS STD:向量
- 29. std ::向量中止问题
- 30. std ::排序在空向量
是的。他们都是平等的。理解'const'的最好方法是将其读为应用于留下的令牌(除非它是最左侧的令牌 - 在这种情况下,它适用于右侧的即时令牌)。 – nakiya
https://isocpp.org/wiki/faq/const-correctness#overview-const – nakiya
@nakiya:请在答案部分填写答案。 – Bathsheba