diff options
author | Dmitriy Smirnov <dmitriy.smirnov@arm.com> | 2023-03-07 21:27:34 +0000 |
---|---|---|
committer | Dmitriy Smirnov <dmitriy.smirnov@arm.com> | 2023-03-07 22:11:07 +0000 |
commit | 2cae60f49b9153f9844964310011889e44a5002c (patch) | |
tree | 649b4701dc20b83be65d3839e419fbb0d0c1c102 | |
parent | 9fccf93af299bb3424ffadf334e3353a485875b5 (diff) | |
download | serialization_lib-2cae60f49b9153f9844964310011889e44a5002c.tar.gz |
Put fethrowexcept under HALF_ENABLE_CPP11_NOEXCEPT macro
Change-Id: I014db667d5be3deb419ef0aa4ab4d69598db607e
Signed-off-by: Dmitriy Smirnov <dmitriy.smirnov@arm.com>
-rw-r--r-- | third_party/half/include/half.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/third_party/half/include/half.hpp b/third_party/half/include/half.hpp index f4d8614..ee8819a 100644 --- a/third_party/half/include/half.hpp +++ b/third_party/half/include/half.hpp @@ -1,6 +1,7 @@ // half - IEEE 754-based half-precision floating-point library.
//
// Copyright (c) 2012-2021 Christian Rau <rauy@users.sourceforge.net>
+// Copyright (c) 2023, ARM Limited.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
@@ -4569,6 +4570,8 @@ namespace half_float /// \throw std::overflow_error if `FE_OVERFLOW` is selected and set
/// \throw std::underflow_error if `FE_UNDERFLOW` is selected and set
/// \throw std::range_error if `FE_INEXACT` is selected and set
+
+ #if not defined HALF_ENABLE_CPP11_NOEXCEPT
inline void fethrowexcept(int excepts, const char *msg = "")
{
excepts &= detail::errflags();
@@ -4581,6 +4584,7 @@ namespace half_float if(excepts & FE_INEXACT)
throw std::range_error(msg);
}
+ #endif //HALF_ENABLE_CPP11_NOEXCEPT
/// \}
}
|