#1045 Fix reference to narrow_cast (#1046)

This commit is contained in:
Tom Isaacson
2017-10-04 05:23:48 +13:00
committed by Jonathan Wakely
parent ef3a6c4d4d
commit 9cf0fcf19d

View File

@@ -11632,7 +11632,7 @@ A key example is basic narrowing:
##### Note ##### Note
The guideline support library offers a `narrow` operation for specifying that narrowing is acceptable and a `narrow` ("narrow if") that throws an exception if a narrowing would throw away information: The guideline support library offers a `narrow_cast` operation for specifying that narrowing is acceptable and a `narrow` ("narrow if") that throws an exception if a narrowing would throw away information:
i = narrow_cast<int>(d); // OK (you asked for it): narrowing: i becomes 7 i = narrow_cast<int>(d); // OK (you asked for it): narrowing: i becomes 7
i = narrow<int>(d); // OK: throws narrowing_error i = narrow<int>(d); // OK: throws narrowing_error