Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
为什么 std::function 在 C++11 中不隐式转换为 bool ? [复制]
这个问题在这里已经有答案了 考虑以下代码 include
c
function
C11
implicitconversion
stdfunction
仅防止二元运算符的隐式转换运算符
我遇到了一个问题 我已将其归结为以下问题 其中 即使应该失败 运算符用法也会编译 C 17 在 GCC 5 x 8 x 和 9 x 上测试 template
c
templates
operatoroverloading
C17
implicitconversion
具有私有基数的函数成员指针
以下代码会产生编译时错误 base print 无法访问类中声明的私有成员 base der 不过我已经做了会员了public在派生类中 为什么这不起作用 include
为什么可为 null 的 int 不能隐式转换为 int ?技术原因还是设计选择?
在 C 中 没有从int 键入int type 我定义了以下隐式运算符 namespace System public partial struct Int32 public static implicit operator Int32 i
c
implicitconversion
为什么这个隐式函数没有被应用?
尝试 Alexey Romanov 中提出的 TupleN 的隐式转换如何在元组之间应用隐式转换 https stackoverflow com questions 23911151 how to apply implicit conver
scala
implicitconversion
C++中bool数据类型的比较
The bool数据类型通常表示为0 as false and 1 as true 然而 也有人说true值可以用除以下以外的值表示1 如果后面的语句是true 那么下面的表达式可能是不正确的 bool x 1 if x 1 Do some
c
implicitconversion
为什么 C++ 隐式转换有效,但显式转换无效?
以下代码在 C 11 中编译成功 include json hpp using json nlohmann json using namespace std int main json js asd string s1 js lt comp
c
C11
casting
implicitconversion
explicitconversion
switch 语句条件中同时具有模板和非模板转换运算符的类
问题最初出现在这个问题 https stackoverflow com questions 25046418 internal compiler error templated conversion operator in switch e
c
C11
languagelawyer
implicitconversion
c14
VB.NET 中的隐式转换
这个问题是针对懒惰的 VB 程序员的 请 在 vb 中我可以做到并且不会出现任何错误 实施例1 Dim x As String 5 Dim y As Integer 5 Dim b As Boolean True 实施例2 Dim a As
VBNET
latebinding
implicitconversion
C# 中的隐式数组转换
我有以下定义了隐式转换运算符的类 class A class B private A m a public B A a this m a a public static implicit operator B A a return new
c
Arrays
operatoroverloading
implicitconversion
转换运算符:gcc 与 clang
考虑以下代码 https godbolt org z s17aoczj6 https godbolt org z s17aoczj6 template
c
languagelawyer
implicitconversion
如何从反射执行显式操作转换?
我想使用反射并使用反射进行隐式或显式转换 鉴于我已经这样定义了 Foo public class Foo public static explicit operator decimal Foo foo return foo Value pu
c
operators
implicitconversion
explicitconversion
为什么允许从超类到子类的隐式转换?
有人能告诉我为什么带有 Compiles 的行可以编译 为什么带有 Doesn t Compile 的行不能编译 我不明白为什么 A 可以隐式转换为 B 而不是相反 public class SomeClass static public
c
NET
inheritance
typeconversion
implicitconversion
隐式复制构造函数
引用自n3337 12 3 1 3 非显式复制 移动构造函数 12 8 是一个转换 构造函数 隐式声明的复制 移动构造函数不是 显式构造函数 可能会调用它来进行隐式类型转换 引自 ANSI ISO IEC 14882 2003 非显式复制构
c
C11
copyconstructor
implicitconversion
Ruby,没有将 Symbol 隐式转换为 Integer
昨天我已经在 没有将 Symbol 隐式转换为 Integer Ruby https stackoverflow com questions 38482973 no implicit conversion of symbol into in
ruby
implicitconversion
为什么 C# 允许从 Long 到 Float 的“隐式”转换,而这可能会丢失精度?
类似的问题长时间处于浮动状态 为什么 https stackoverflow com questions 4352213 long in float why这里没有回答我正在寻找的内容 C 标准允许从 long 到 float 的隐式转换
c
NET
floatingpoint
longinteger
implicitconversion
Printf 函数格式化程序
有以下简单的C 代码 include
c
Integer
printf
Overflow
implicitconversion
为什么我不能在该表达式中使用三元运算符? [复制]
这个问题在这里已经有答案了 var dict new Dictionary
c
ternaryoperator
implicitconversion
隐式类型转换优先级是如何确定的?
这是代码 class A public int val char cval A val 10 cval a operator char const return cval operator int const return val int
c
implicitconversion
链接隐式转换运算符
我有一个类 我需要隐式转换为一些带有中间值的东西 例如 struct outer struct inner operator T return T operator inner return inner 如果我有这个结构 是吗 always
c
C11
implicitconversion
«
1
2
3
4
5
6
»