Issue2168

Title 2168. Narrowing conversions and +/- infinity
Status open Section 8.6.4 [dcl.init.list]
Submitter Hubert Tong

Created on 2015-08-19.00:00:00 by admin, last changed by admin.

Messages
msg5808 (view) Date: 2016-11-15.00:00:00

Notes from the November, 2016 meeting:

SG6 said that arithmetic operations (not conversions) that produce infinity are not allowed in a constant expression. However, using std::numeric_limits<T>::infinity() is okay, but it can't be used as a subexpression. Conversions that produce infinity from non-infinity values are considered to be narrowing conversions.

msg5674 (view) Date: 2015-10-15.00:00:00

Notes from the October, 2015 meeting:

CWG requests the assistance of SG6 in resolving this issue.

msg5673 (view) Date: 2015-08-19.00:00:00

The intended treatment of a floating point infinity with respect to narrowing conversions is not clear. Is std::numeric_limits<double>::infinity() usable in a constant expression, for example, and should that be different from a calculation that results in an infinity?

History
Date User Action Args
2017-02-06 00:00:00adminsetsection: 8.5.4 [dcl.init.list] -> 8.6.4 [dcl.init.list]
2017-02-06 00:00:00adminsetmessages: + msg5808
2015-11-10 00:00:00adminsetmessages: + msg5674
2015-08-19 00:00:00admincreate