Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
为什么使用 boost::none 无法通过 nvcc 编译?
我正在尝试编译以下代码 include
c
CUDA
optiontype
compilerbug
boostoptional
Constexpr if 具有非布尔条件
我似乎发现了 Clang 和 GCC 不同意的地方 这是代码 int main if constexpr 2 使用 GCC 7 4 0 可以成功编译 但使用 Clang 7 0 0 则失败 并显示以下错误消息 test cpp 3 17 e
c
languagelawyer
C17
implicitconversion
compilerbug
Clang 和二进制折叠表达式 — 空参数包的诅咒
具体来说 Clang 3 6 0 目前由 Coliru 托管 所有这些片段都是从以下位置调用的 int main foo std cout lt lt n n foo 1 2 3 以下代码 template
c
Clang
compilerbug
C17
foldexpression
C++11 future.wait_for() 始终返回 future_status::timeout
我有一个 C 11 程序 用于检查数字是否为素数 程序等待有一个 future 对象准备好 准备好后 程序会告诉 future 对象的提供者函数是否认为该数字是素数 future example include
c
C11
Future
compilerbug
为什么这段使用 __LINE__ 的代码在 MSVC 的 Release 模式下可以编译,而在 Debug 模式下却不能编译?
考虑这个程序 include
c
visualc
compilererrors
VisualStudio2017
compilerbug
返回元组时 GCC/Clang x86_64 C++ ABI 不匹配?
当尝试时优化 x86 64 上的返回值 https stackoverflow com q 25381736 3919155 我注意到一个奇怪的事情 即 给定代码 include
c
tuples
x8664
ABI
compilerbug
使用字符串文字在构造函数中初始化 std::array
成员。海湾合作委员会错误?
下面的例子初始化一个std array
c
gcc
C11
compilerbug
stdarray
嵌套两次的 sizeof 可以成为依赖表达式吗?
我注意到 gcc 5 0 拒绝以下代码 而 clang 3 6 接受它 template
c
templates
languagelawyer
dependenttype
compilerbug
意外的 gcc 警告:函数返回局部变量的地址 - 这是编译器错误吗?
以下是最小的工作示例 好吧 实际上它是最小的非工作示例 当使用 gcc 从版本 5 0 到 9 3 编译时 它会发出以下警告 它甚至似乎只在发布版本中发出警告 02及更高 Code class A class B const A getA
c
gcc
gccwarning
compilerbug
条件运算符的返回类型和两阶段查找
考虑以下片段 struct Base struct Derived Base void f Base std cout lt lt f Base n template
c
languagelawyer
compilerbug
namelookup
dependentname
编译器错误,还是非标准代码? - lambda 中的可变参数模板捕获
我有以下 C 11 代码 template
c
C11
Lambda
variadictemplates
compilerbug
可能是C# 4.0编译器错误,其他人可以验证吗?
由于我不知道究竟是哪一部分触发了错误 所以我不完全确定如何更好地标记它 这个问题是SO问题的副产品C 代码似乎以无效的方式进行优化 导致对象值变为 null https stackoverflow com questions 3379894
c40
compilerbug
在发布模式下,代码行为不符合预期
以下代码在调试模式和发布模式下产生不同的结果 使用 Visual Studio 2008 int tmain int argc TCHAR argv for int i 0 i lt 17 i int result i 16 if resu
c
Optimization
visualstudio2008
compilerbug
在可为 null 的可选参数中使用 C# 7.1 默认文字会导致意外行为
C 7 1 引入了一个名为 默认文字 的新功能 允许新的default表达式 instead of writing Foo x default Foo we can just write Foo x default For Nullable
c
default
Nullable
compilerbug
c71
放弃 C++20 中显式函数模板特化的访问检查规则
温度规格 6通过实现添加到 C 20P0692R1 专业化访问检查 emphasis mine 温度规格 6常用的访问检查规则不适用于声明中的名称显式实例化或明确的专业化 但出现在函数体 默认参数 基本子句 成员规范 枚举器列表或静态数据成
c
gcc
Clang
C20
compilerbug
这是编译器错误吗?难道我做错了什么?
我正在尝试制作一个简单的地图来查找一些数据 但结果非常奇怪 include stdafx h include atlstr h include
c
Dictionary
compilerbug
使用 Clang 与全局模板变量重复符号
我有这三个文件 foo h pragma once template
c
templates
Clang
compilerbug
位域的 GCC 实现中的一个错误
在 C11 中工作 以下结构 struct S unsigned a 4 Bool b 1 被 GCC 列为unsigned 4 个字节 其中使用了 4 位 后面跟着一个 Bool 4 个字节 其中使用 1 位 总大小为 8 个字节 请注意
gcc
C99
bitfields
C11
compilerbug
[[maybe_unused]] 在成员变量上,GCC 警告(错误地?)该属性被忽略
在下面的example struct Foo maybe unused int member 1 void bar maybe unused int local 0 int main int argc char argv Foo f f b
c
C17
compilerwarnings
compilerbug
函数局部 typedef 在 C++0x lambda 中是否可见?
我遇到了一个奇怪的问题 以下简化代码重现了 MSVC 2010 中的问题 template
c
Lambda
C11
compilerbug
1
2
»