读书人

请教一上c++的表达式

发布时间: 2013-01-11 11:57:35 作者: rapoo

请问一下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的字段不受编译器优化。这确保了这个字段的值最新。


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

读书人网 >C++

热点推荐