Tags: awslabs/aws-c-common
Tags
Simplify how inline math files are included (#1195) **Issue #:** * #1155 * #1194 Users are reporting double definition of the math inline functions, when building in scenarios I'm not familiar with... The [existing ifdef logic](https://github.com/awslabs/aws-c-common/blob/c6f8f8a3b267e2a2229f71ed0d4b087edd780845/include/aws/common/math.inl#L16-L47) is very hard to follow, so it's not surprising there are edge cases. **Description of changes:** Simplify how inline math files are included - Just have 1 big `#ifdef/elif/elif` chain - If a branch needs 2 .inl files, then include both from from that branch - math.fallback.inl no longer includes math.gcc_builtin.inl in some circumstances. It's the fallback file. Let's keep it simple. - Stop doing the thing where we don't include the .inl files when building `__cplusplus`. - This added too much complexity. Whatever [weird performance edge case](https://github.com/awslabs/aws-c-common/blob/c6f8f8a3b267e2a2229f71ed0d4b087edd780845/include/aws/common/math.inl#L38-L40) we were working around in 2018 is surely fixed in modern compilers.
PreviousNext