mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
fix ctad warning in llvm
This commit is contained in:
parent
71ec9f84d8
commit
d0e5daf441
@ -119,6 +119,13 @@ private:
|
||||
T ptr_;
|
||||
};
|
||||
|
||||
#if (defined(__cplusplus) && (__cplusplus >= 201703L))
|
||||
// deduction guide to prevent the ctad-maybe-unsupported warning
|
||||
template <class T>
|
||||
not_null(T ptr) -> not_null<T>;
|
||||
|
||||
#endif (defined(__cplusplus) && (__cplusplus >= 201703L))
|
||||
|
||||
template <class T>
|
||||
auto make_not_null(T&& t) {
|
||||
return not_null<std::remove_cv_t<std::remove_reference_t<T>>>{std::forward<T>(t)};
|
||||
|
@ -28,7 +28,7 @@ int operator_subscript_no_throw() noexcept
|
||||
|
||||
void setup_termination_handler() noexcept
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND)
|
||||
|
||||
auto& handler = gsl::details::get_terminate_handler();
|
||||
handler = &test_terminate;
|
||||
|
@ -28,7 +28,7 @@ int narrow_no_throw()
|
||||
|
||||
void setup_termination_handler() noexcept
|
||||
{
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(GSL_MSVC_USE_STL_NOEXCEPTION_WORKAROUND)
|
||||
|
||||
auto& handler = gsl::details::get_terminate_handler();
|
||||
handler = &test_terminate;
|
||||
|
Loading…
Reference in New Issue
Block a user