Skip to content

numeric_cast will never throw #200

@obatysh

Description

@obatysh

Check in numeric_cast will never throw, as after the cast to the TargetType the value will never be greater than the maximum of the TargetType:
if (static_cast(value) >
std::numeric_limits::max())
{
throw std::overflow_error("Cannot convert ");
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions