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

Created on 2015-08-19.00:00:00 last changed 87 months ago

Messages

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.

Date: 2015-10-15.00:00:00

Notes from the October, 2015 meeting:

CWG requests the assistance of SG6 in resolving this issue.

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:00adminsetmessages: + msg5802
2015-11-10 00:00:00adminsetmessages: + msg5679
2015-08-19 00:00:00admincreate