Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
类模板的嵌套模板参数推导不起作用
In 本次问答 https stackoverflow com a 42221591 819272我编写了一个小包装类 它提供对范围的反向迭代器访问 依赖于类模板的 c 1z 语言功能模板参数推导 p0091r3 http www open
c
templates
C17
classtemplate
templateargumentdeduction
推导具有两个以上参数的 std::function
我想知道为什么std function http en cppreference com w cpp utility functional function只知道有两个参数的函数 我已经编写了一些运行良好的代码 但存在许多限制 欢迎任何反馈
c
C11
templates
templateargumentdeduction
如何获取指向引用成员的指针?
考虑这段代码 struct AA int rr 有没有办法获取指向的指针 或引用 AA rr为了获得这个 AA aa auto mm AA rr error cannot create pointer to reference member
c
gcc
reference
pointertomember
templateargumentdeduction
递归函数的返回类型推导
最近 我读到巴里的回答 https stackoverflow com a 40873657 6793559对于这个问题C 11 中的递归 lambda 函数 https stackoverflow com q 2067988 679355
c
C17
templateargumentdeduction
genericlambda
推导指南、模板和子对象:哪个编译器是正确的?
考虑以下片段 struct S S template
c
templates
languagelawyer
C17
templateargumentdeduction
类模板参数推导完美转发
我想了解演绎指南如何与通用参考一起使用std forward 特别是创建完美的转发包装器 下面的代码提供了在两种情况下试验函子包装器的代码 一种具有隐式推导指南 一种具有显式推导指南 我已经放了很多 and std forward在评论中
c
templates
C17
perfectforwarding
templateargumentdeduction
为什么 std::function 不能接受推导类型作为其模板参数?
include
c
C11
templates
types
templateargumentdeduction
Visual C++ 无法推导模板模板参数
以下 C 17 代码片段在 GCC 和 CLang 中进行编译 但在 Visual C 中会出现以下错误
c
templates
C17
templateargumentdeduction
templatetemplates
类模板专业化推导是否应该考虑推导指导参数初始化?
作为此的后续question https stackoverflow com q 51235025 5632316 我测试了 clang 和 gcc 的行为 看来两个编译器对 C 标准有不同的解释 在下面的示例中 如果需要根据推导指南假设构
c
languagelawyer
C17
templateargumentdeduction
带有两个参数包的函数模板重载解析
考虑以下代码 include
c
languagelawyer
overloadresolution
templateargumentdeduction
通过参数推导多参数模板中的第一个模板参数
首先是我的问题 然后解释我正在尝试做什么 因为我可能会错误地处理问题 是否可以在指定其他参数的同时从参数中推导出多参数模板中的第一个模板参数 例子 template
c
templates
templateargumentdeduction
什么是模板推导指南以及我们什么时候应该使用它们?
C 17标准引入了 模板推导指南 我认为它们与此版本标准中引入的构造函数的新模板参数推导有关 但我还没有看到关于它们是什么以及它们的用途的简单的 常见问题解答风格的解释 C 17 中的模板推导指南是什么 为什么 以及何时 我们需要它们 我如
c
templates
C17
templateargumentdeduction
ctad
不可行的函数模板的类型推导
In 他的回答 https stackoverflow com a 22259156 420683 to 这个问题 https stackoverflow com q 22258054 420683以及评论区 约翰内斯 绍布 https s
c
templates
overloadresolution
templateargumentdeduction
混合可变参数模板值和可变参数推导类型
标准是否完美定义了以下内容 include
c
C11
templates
variadictemplates
templateargumentdeduction
模板特化与别名模板推导区别
我很难理解在以下情况下演绎是如何工作的 template
c
C11
templates
templatemetaprogramming
templateargumentdeduction
模板非类型参数推导
是否可以推断出 c 17 函数的模板值 而不是类型 函数 foo template
c
templates
C17
constexpr
templateargumentdeduction
当函数参数是对 T 的 const 引用时,为什么 T 的模板参数推导会“跳过”数组元素的常量性?
让我们考虑一下这些定义 full type information with typeid template
c
Arrays
templateargumentdeduction
std::bind 如何按值获取可变参数,即使具有通用引用?
函数签名为std bind 如下 https en cppreference com w cpp utility functional bind template lt class F class Args gt unspecified b
c
templates
variadictemplates
move
templateargumentdeduction
为什么大括号初始化器的自动类型推导和模板类型推导不同?
我明白 给定一个支撑初始化器 auto将推导出一个类型std initializer list 而模板类型推导将会失败 auto var 1 2 3 type deduced as std initializer list
c
C11
templates
templateargumentdeduction
listinitialization
为什么不能从 Template
::Type 推导出 T? [复制]
这个问题在这里已经有答案了 这段代码有什么问题 include
c
templates
parameters
templateargumentdeduction
1
2
»