From 128b4356ac1dbd4babc911a0a2544acd097b1dbc Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Fri, 15 Nov 2019 16:29:41 -0800 Subject: [PATCH] changing check from __cplusplus 201703L to __cpp_deduction_guides 201907L --- include/gsl/pointers | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/gsl/pointers b/include/gsl/pointers index f96d064..ae6f8c5 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -272,15 +272,13 @@ auto make_strict_not_null(T&& t) { return strict_not_null>>{std::forward(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 -not_null(T ptr) -> not_null; -template -strict_not_null(T ptr) -> strict_not_null; +template not_null(T) -> not_null; +template strict_not_null(T) -> strict_not_null; -#endif // (defined(__cplusplus) && (__cplusplus >= 201703L)) +#endif // (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201907L)) } // namespace gsl