8 #if !defined(ORT_NO_EXCEPTIONS)
12 namespace onnxruntime {
16 #else // ^^ !defined(ORT_NO_EXCEPTIONS) ^^ / vv defined(ORT_NO_EXCEPTIONS) vv
20 #include <type_traits>
24 namespace onnxruntime {
27 [[noreturn]]
inline void OnNarrowingError() noexcept {
38 GSL_SUPPRESS(
type.1) constexpr T narrow(U u) noexcept {
39 constexpr
const bool is_different_signedness =
45 const T
t = gsl::narrow_cast<T>(u);
49 if (static_cast<U>(
t) != u || (is_different_signedness && ((
t < T{}) != (u < U{})))) {
50 detail::OnNarrowingError();
57 GSL_SUPPRESS(
type.1) constexpr T narrow(U u) noexcept {
58 const T t = gsl::narrow_cast<
T>(u);
60 if (static_cast<U>(t) != u) {
61 detail::OnNarrowingError();
69 #endif // defined(ORT_NO_EXCEPTIONS)
GLsizei const GLfloat * value
auto fprintf(std::FILE *f, const S &fmt, const T &...args) -> int