File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public:
100100
101101 constexpr operator T() const { return get(); }
102102 constexpr T operator->() const { return get(); }
103- constexpr decltype(auto) operator*() const { return *get(); }
103+ constexpr decltype(auto) operator*() const { return *get(); }
104104
105105 // prevents compilation when someone attempts to assign a null pointer constant
106106 not_null(std::nullptr_t) = delete;
@@ -272,6 +272,14 @@ auto make_strict_not_null(T&& t) {
272272 return strict_not_null<std::remove_cv_t<std::remove_reference_t<T>>>{std::forward<T>(t)};
273273}
274274
275+ #if ( defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L) )
276+
277+ // deduction guides to prevent the ctad-maybe-unsupported warning
278+ template <class T> not_null(T) -> not_null<T>;
279+ template <class T> strict_not_null(T) -> strict_not_null<T>;
280+
281+ #endif // ( defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L) )
282+
275283} // namespace gsl
276284
277285namespace std
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ int operator_subscript_no_throw() noexcept
2828
2929void setup_termination_handler () noexcept
3030{
31- #if defined(_MSC_VER )
31+ #if defined(GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND )
3232
3333 auto & handler = gsl::details::get_terminate_handler ();
3434 handler = &test_terminate;
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ int narrow_no_throw()
2828
2929void setup_termination_handler () noexcept
3030{
31- #if defined(_MSC_VER )
31+ #if defined(GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND )
3232
3333 auto & handler = gsl::details::get_terminate_handler ();
3434 handler = &test_terminate;
You can’t perform that action at this time.
0 commit comments