changing check from __cplusplus 201703L to __cpp_deduction_guides 201907L

This commit is contained in:
Jordan Maples [MSFT] 2019-11-15 16:29:41 -08:00
parent 8e481ebe19
commit 128b4356ac

View File

@ -272,15 +272,13 @@ auto make_strict_not_null(T&& t) {
return strict_not_null<std::remove_cv_t<std::remove_reference_t<T>>>{std::forward<T>(t)};
}
#if (defined(__cplusplus) && (__cplusplus >= 201703L))
#if (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201907L))
// deduction guides to prevent the ctad-maybe-unsupported warning
template <class T>
not_null(T ptr) -> not_null<T>;
template <class T>
strict_not_null(T ptr) -> strict_not_null<T>;
template <class T> not_null(T) -> not_null<T>;
template <class T> strict_not_null(T) -> strict_not_null<T>;
#endif // (defined(__cplusplus) && (__cplusplus >= 201703L))
#endif // (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201907L))
} // namespace gsl