mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
changing check from __cplusplus 201703L to __cpp_deduction_guides 201907L
This commit is contained in:
parent
8e481ebe19
commit
128b4356ac
@ -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)};
|
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
|
// deduction guides to prevent the ctad-maybe-unsupported warning
|
||||||
template <class T>
|
template <class T> not_null(T) -> not_null<T>;
|
||||||
not_null(T ptr) -> not_null<T>;
|
template <class T> strict_not_null(T) -> strict_not_null<T>;
|
||||||
template <class T>
|
|
||||||
strict_not_null(T ptr) -> strict_not_null<T>;
|
|
||||||
|
|
||||||
#endif // (defined(__cplusplus) && (__cplusplus >= 201703L))
|
#endif // (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201907L))
|
||||||
|
|
||||||
} // namespace gsl
|
} // namespace gsl
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user