mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge pull request #826 from JordanMaples/dev/jomaples/ctad_fix_v2
fix ctad warning in llvm
This commit is contained in:
commit
7e99e76c97
@ -272,6 +272,14 @@ 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(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L) )
|
||||||
|
|
||||||
|
// deduction guides to prevent the ctad-maybe-unsupported warning
|
||||||
|
template <class T> not_null(T) -> not_null<T>;
|
||||||
|
template <class T> strict_not_null(T) -> strict_not_null<T>;
|
||||||
|
|
||||||
|
#endif // ( defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L) )
|
||||||
|
|
||||||
} // namespace gsl
|
} // namespace gsl
|
||||||
|
|
||||||
namespace std
|
namespace std
|
||||||
|
@ -28,7 +28,7 @@ int operator_subscript_no_throw() noexcept
|
|||||||
|
|
||||||
void setup_termination_handler() 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();
|
auto& handler = gsl::details::get_terminate_handler();
|
||||||
handler = &test_terminate;
|
handler = &test_terminate;
|
||||||
|
@ -28,7 +28,7 @@ int narrow_no_throw()
|
|||||||
|
|
||||||
void setup_termination_handler() 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();
|
auto& handler = gsl::details::get_terminate_handler();
|
||||||
handler = &test_terminate;
|
handler = &test_terminate;
|
||||||
|
Loading…
Reference in New Issue
Block a user