读书人

c++标准帝来问个概念多谢

发布时间: 2012-10-14 14:55:08 作者: rapoo

c++标准帝来,问个概念,谢谢

C/C++ code
In a declaration T D where D has the form* cv-qualifier-seqopt D1And the type of the identifier in the declaration T D1 is "derived-declarator-type-list T", then the type of the identifier of D is "derived-declarator-type-list cv-qualifier-seq pointer to T". The cv-qualifiers apply to the pointer and not to the object pointer to.



里面有2个概念不懂:

1. derived-declarator-type-list T 是啥意思?

2. derived-declarator-type-list cv-qualifier-seq 又是啥意思?



3. 好几本经典书籍都提到volatile, 我翻阅不少老帖子, 似乎有这么一个共识:

volatile 与多线程没有太多关系了, 其意义不大了。 那么为什么说上反复提这个东西呢?

3个问题,谢谢





[解决办法]
你从哪里看出来的这半段头“共识”
探讨
volatile 与多线程没有太多关系了, 其意义不大了。

[解决办法]
我记得我在以前的帖子里说过Windows SDK多线程编程中手动volatile的情形并不多,因为许多原子操作的接口已经是volatile了,但并不代表volatile对多线程无意义吧
[解决办法]
表述起来很费劲,但意思其实很简单啊

C/C++ code
typedef int unsigned my_uint_arr[3];int main(){    const my_uint_arr data={0,1,2};    const my_uint_arr *const volatile p=&data;        return 0;} 

读书人网 >C++

热点推荐