mirror of
https://github.com/microsoft/GSL.git
synced 2025-05-03 13:21:19 -04:00
moving exception include
This commit is contained in:
parent
4b643918a1
commit
769f01900d
@ -17,8 +17,6 @@
|
|||||||
#ifndef GSL_CONTRACTS_H
|
#ifndef GSL_CONTRACTS_H
|
||||||
#define GSL_CONTRACTS_H
|
#define GSL_CONTRACTS_H
|
||||||
|
|
||||||
#include <exception>
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// make suppress attributes parse for some compilers
|
// make suppress attributes parse for some compilers
|
||||||
// Hopefully temporary until suppression standardization occurs
|
// Hopefully temporary until suppression standardization occurs
|
||||||
@ -47,6 +45,10 @@
|
|||||||
#pragma clang diagnostic ignored "-Winvalid-noreturn"
|
#pragma clang diagnostic ignored "-Winvalid-noreturn"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GSL_STRINGIFY_DETAIL(x) #x
|
#define GSL_STRINGIFY_DETAIL(x) #x
|
||||||
@ -110,14 +112,6 @@ namespace details
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename Exception>
|
|
||||||
[[deprecated("GSL no longer supports throwing for contract violations. Use gsl::details::terminate() instead.")]]
|
|
||||||
[[noreturn]] void throw_exception(Exception&&) noexcept
|
|
||||||
{
|
|
||||||
gsl::details::terminate();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace details
|
} // namespace details
|
||||||
} // namespace gsl
|
} // namespace gsl
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user