Commit 221fb1e1 authored by Dennis Luxen's avatar Dennis Luxen Committed by Jason Rhinelander
Browse files

Untangle cast logic to not implicitly require castability (#1442)

The current code requires implicitly that integral types are cast-able to floating point. In case of strongly-typed integrals (e.g. as explained at http://www.ilikebigbits.com/blog/2014/5/6/type-safe-identifiers-in-c) this is not always the case.

This commit uses SFINAE to move the numeric conversions into separate `cast()` implementations to avoid the issue.
parent 534b756c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment