9得票1回答
为什么我不能为函数的形式参数指定存储类?

当我按照以下方式操作时,代码能够正常工作: #include <stdio.h> void test( int a) { printf("a=%d\n",a); } int main() { test(10); return 1; } 但是当我这样做...

8得票1回答
constexpr静态模板函数:g++错误在clang上只是警告

请考虑以下代码片段: #include <iostream> template <int I> constexpr int f() { return I * f<I-1>(); } template<> constexpr int f&lt...

8得票1回答
C语言中的_Thread_local存储类说明符是什么?

我在书 C How to Program 7th 中读到了一条关于一种新的标准C存储类别 _Thread_local 的注释: 新的C标准增加了存储类别说明符_Thread_local,超出了本书的范围。 我在谷歌和这里搜索了它,但是没有任何结果。有人能提供一些相关链接吗?