Throw when pos2 is out of range

This commit is contained in:
Krystian Stasiowski
2020-02-01 13:59:06 -05:00
parent 7d198aa043
commit c9910e30ee
2 changed files with 10 additions and 1 deletions

View File

@ -45,7 +45,7 @@ using smallest_width =
template<typename To>
void is_nothrow_convertible_helper(To) noexcept;
// MSVC is unable to parse this inline, so a helper is needed
// MSVC is unable to parse this as a single expression, so a helper is needed
template<typename From, typename To, typename =
decltype(is_nothrow_convertible_helper<To>(std::declval<From>()))>
struct is_nothrow_convertible_msvc_helper