"git@developer.sourcefind.cn:gaoqiong/pybind11.git" did not exist on "ebd5c5b48c3e56e08630d11f7ed4cc5b23b02ed9"
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.
Showing
Please register or sign in to comment