首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请教一上c++的表达式

2013-01-11 
请问一下c++的表达式templatebool threads,int ints请问这是什么意思啊。[解决办法]The volatile keyword

请问一下c++的表达式
template<bool threads,int ints>
请问这是什么意思啊。
[解决办法]
The volatile keyword indicates that a field might be modified by multiple threads that are executing at the same time. Fields that are declared volatile are not subject to compiler optimizations that assume access by a single thread. This ensures that the most up-to-date value is present in the field at all times.
volatile关键字表示字段可以由多个线程同时执行修改。假定由单个线程访问时,被声明为volatile的字段不受编译器优化。这确保了这个字段的值最新。


[解决办法]
非类型模版参数

热点排行