Use feature test macro for deduction guide in Replaceable.h (#1065)
Summary: - Replace a check for deduction guide support to use a feature test macro for deduction guides rather than a check using `__cplusplus` directive. - The existing check using the `__cplusplus` directive is not correct for GCC 5.1. With GCC 5.1, `__cplusplus > 201402L` will be true, but the check for `#if __cpp_deduction_guides >= 201703` will be false. So, it is not valid to just rely on the `__cplusplus` directive to infer deduction guide support. - We extend the check to use the feature test macro except in the case of MSVC, which we infer the feature is supported. MSVC does not define feature test macros, despite having implemented the feature. Pull Request resolved: https://github.com/facebook/folly/pull/1065 Reviewed By: aary Differential Revision: D14518809 Pulled By: yfeldblum fbshipit-source-id: a976ae527ef986ae6d3fc52c316af9bf8e209767
Showing
Please register or sign in to comment