Page MenuHomePhabricator

[libcxx] [test] Avoid narrowing conversions in quoted.pass.cpp.
ClosedPublic

Authored by STL_MSFT on Jun 24 2016, 6:24 PM.

Details

Summary

Avoid narrowing conversions in quoted.pass.cpp.

According to the Standard, when char has a signed range and wchar_t has an unsigned range, brace-init has to reject the potentially narrowing conversion.

Fixes MSVC error C2397 "conversion from 'char' to 'wchar_t' requires a narrowing conversion".

Diff Detail

Event Timeline

STL_MSFT updated this revision to Diff 61869.Jun 24 2016, 6:24 PM
STL_MSFT retitled this revision from to [libcxx] [test] Avoid narrowing conversions in quoted.pass.cpp..
STL_MSFT updated this object.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
EricWF accepted this revision.Jun 26 2016, 12:43 PM
EricWF edited edge metadata.

It seems like this has the possibility to lose some useful diagnostics if a narrowing conversion actually occurs.
However I'm OK with the change.

This revision is now accepted and ready to land.Jun 26 2016, 12:43 PM
EricWF closed this revision.Jun 26 2016, 12:44 PM

r273818.