Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
联合公共初始序列与原语
我试图更好地理解关于联合和共同初始序列规则的一个相当令人惊讶的发现 常见的初始序列规则表示 class mem 23 在具有结构类型 T1 的活动成员的标准布局联合中 允许读取结构类型 T2 的另一个联合成员的非静态数据成员 m 前提是 m
c
C11
c14
languagelawyer
unions
包含类型的类型的模板函数重载
我正在尝试执行以下操作 include
c
templates
c14
templatetemplates
using 声明不能在函数作用域内重复。这是为什么?
在 namespace udecl 10 中有以下示例 namespace A int i namespace A1 using A i using A i OK double declaration void f using A i us
c
languagelawyer
c14
usingdeclaration
模板参数替换有惊喜吗?
N3690 14 8 2 第 3 段有一个令人兴奋的例子 template
c
templates
c14
languagelawyer
如何在编译时推断嵌套 std::vector 的内部类型?
有一天我问了一个非常类似的问题 https stackoverflow com questions 59490698 how can i get the depth of a multidimensional stdvector at co
c
templates
c14
templatemetaprogramming
使用 SFINAE 和 void_t 区分类型
我遇到了一些情况 我必须编写两个函数 其中一个应该使用原始类型调用 std string 另一种应该用其他类型来调用 到目前为止 我以工作解决方案结束 template
c
c14
在 C++14 / C++11 中隐藏
中的 isnan?
我这里有一个小型测试应用程序 它使用isnan from
c
C11
c14
NaN
cmath
QtCreator 中使用 Clang 支持 C++14
如何使用 Clang 3 5 在 QtCreator 3 3 中启用 C 14 支持 我添加了一个 Clang 套件并且添加了CONFIG c 14在我的项目文件中 然而 当使用例如返回类型推导 https stackoverflow co
c
Clang
QtCreator
c14
尾随返回类型中的占位符是否会覆盖初始占位符?
g 似乎接受任意组合auto and decltype auto 作为初始和尾随返回类型 int a auto f return a int auto g gt auto return a int auto h gt decltype au
c
decltype
c14
trailingreturntype
returntypededuction
asio::io_service 工作立即结束
我正在尝试学习 io service 并使用共享指针 我希望代码无限工作 直到我调用 stop 方法或类似的东西 不幸的是 在屏幕上看到 workHandler 的输出后 程序关闭了 有人能解释为什么会发生这种情况吗 include
c
Multithreading
C11
c14
boostasio
重新解释强制转换模板非类型参数:clang c++14 vs c++1z
考虑以下代码 template
c
Clang
c14
C17
如果浮点范围更大,通过浮点的往返是否始终定义行为?
假设我有两种算术类型 一种是整数类型 I 和一个浮点数 F 我还假设std numeric limits i max 小于std numeric limits i
c
languagelawyer
c14
floatingpointconversion
给定 int **p1 和 const int**p2 p1 == p2 格式正确吗?
给定以下函数 void g int p1 const int p2 if p1 p2 clang 回到3 0版本 产生此警告 现场观看 http melpon org wandbox permlink lCtOd2FagxDI9n2T wa
c
C11
languagelawyer
c14
没有匹配的构造函数来初始化“std::thread”
我一直在研究一个相当简单的设施 并发for循环构造 它采用输入元素列表 输出向量和从输入元素计算输出元素的函数 我有这个片段无法编译 template
c
Multithreading
c14
如果要调用多个成员函数,对象编辑器是一个好方法吗?
我经常对这样的类成员函数的顺序调用感到恼火 忽略新用法 它是针对 Qt 的 但它与 Qt 并不严格相关 A a new A a gt fun1 one a gt fun2 1 2 a gt fun10 end 我总觉得这样的代码应该写成简单
c
templates
c14
如何通过 WebAssembly 使用向量(C++ STL)
include
c14
WebAssembly
检查序列容器在内存中是否连续
有没有办法检查序列容器在内存中是否连续 就像是 include
c
C11
containers
c14
typetraits
如何在 Mac OSX 中获取真实的日历微秒时间(自 1970 年以来的纪元)?
请通过下面的 Qn 了解上下文 为什么 clang g 在 Mac OSX 中没有为 chrono high resolution clock now 提供正确的微秒输出 https stackoverflow com q 45882606
c
MacOS
QT
c14
cchrono
constexpr 错误; VS2017 C++编译器回归?
刚刚安装了 VS2017 它声称自 2015 年以来就拥有卓越的 C 14 支持 这是初级的 在我的一个项目上试了一下 它使用了constexpr 并注意到似乎存在一些回归 这段代码 struct s size t i constexpr
c
visualc
c14
visualc2017
是否可以计算出多态 C++ 14 lambda 的参数类型和返回类型?
从这个问题开始 是否可以计算出 lambda 的参数类型和返回类型 https stackoverflow com questions 7943525 is it possible to figure out the parameter t
c
Lambda
metaprogramming
c14
templatemetaprogramming
«
1 ...
6
7
8
9
10
11
12
...20
»