由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - C++隐式类型转换的规则?
相关主题
0 < -1 ? A c++ question有个SB interviewer和我说++i比i++好 (转载)
真是奇了怪了,VC编译器问题?指针的大小是 4 byte还是有赖于系统?
conversion(c++)请问关于overloading <<
C++命名空间和算子重载今天给c++震惊了
问个c++的弱问题leetcode上一个问题请教
关于数组问个g++的问题
问个无厘头问题interview questions
求教两个new - delete 问题, C++C++的一个问题
相关话题的讨论汇总
话题: type话题: c++话题: operand话题: double
进入Programming版参与讨论
1 (共1页)
g*********s
发帖数: 1782
1
比如 (-1<(unsigned) 0),true or false?
t****t
发帖数: 6806
2
9 Many binary operators that expect operands of arithmetic or enumera-
tion type cause conversions and yield result types in a similar way.
The purpose is to yield a common type, which is also the type of the
result. This pattern is called the usual arithmetic conversions,
which are defined as follows:
--If either operand is of type long double, the other shall be con-
verted to long double.
--Otherwise, if either operand is double, the other shall be converted


【在 g*********s 的大作中提到】
: 比如 (-1<(unsigned) 0),true or false?
g*********s
发帖数: 1782
3
您老从C++ standard里翻出来的?佩服佩服。

【在 t****t 的大作中提到】
: 9 Many binary operators that expect operands of arithmetic or enumera-
: tion type cause conversions and yield result types in a similar way.
: The purpose is to yield a common type, which is also the type of the
: result. This pattern is called the usual arithmetic conversions,
: which are defined as follows:
: --If either operand is of type long double, the other shall be con-
: verted to long double.
: --Otherwise, if either operand is double, the other shall be converted
:

1 (共1页)
进入Programming版参与讨论
相关主题
C++的一个问题问个c++的弱问题
c++ interview: iterator 和 pointer区别?关于数组
C++ Q110: Add without +问个无厘头问题
Java的POD比C++干净很多求教两个new - delete 问题, C++
0 < -1 ? A c++ question有个SB interviewer和我说++i比i++好 (转载)
真是奇了怪了,VC编译器问题?指针的大小是 4 byte还是有赖于系统?
conversion(c++)请问关于overloading <<
C++命名空间和算子重载今天给c++震惊了
相关话题的讨论汇总
话题: type话题: c++话题: operand话题: double