mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-08 22:54:28 +02:00
double check MSVC fix
This commit is contained in:
@@ -46,31 +46,18 @@ UNITS_DIAGNOSTIC_POP
|
|||||||
#define UNITS_FMT_TO_ARG_ID(arg) static_cast<int>(arg)
|
#define UNITS_FMT_TO_ARG_ID(arg) static_cast<int>(arg)
|
||||||
#define UNITS_FMT_FROM_ARG_ID(arg) static_cast<size_t>(arg)
|
#define UNITS_FMT_FROM_ARG_ID(arg) static_cast<size_t>(arg)
|
||||||
|
|
||||||
#if false
|
// This re-uses code from fmt;
|
||||||
|
#if FMT_EXCEPTIONS
|
||||||
// just reuse FMT_THROW - we're anyway only throwing from within string formatting code
|
#if FMT_MSC_VERSION || defined(__NVCC__)
|
||||||
#if FMT_EXCEPTIONS && (FMT_MSC_VERSION || defined(__NVCC__))
|
|
||||||
// work around FMT_THROW being defined without a fully qualified namespace
|
|
||||||
#define UNITS_THROW(x) ::fmt::detail::do_throw(x)
|
#define UNITS_THROW(x) ::fmt::detail::do_throw(x)
|
||||||
#else
|
#else
|
||||||
#define UNITS_THROW(x) FMT_THROW(x)
|
#define UNITS_THROW(x) throw x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
#define UNITS_THROW(x) \
|
||||||
# if FMT_EXCEPTIONS
|
do { \
|
||||||
# if FMT_MSC_VERSION || defined(__NVCC__)
|
FMT_ASSERT(false, (x).what()); \
|
||||||
# define UNITS_THROW(x) ::fmt::detail::do_throw(x)
|
} while (false)
|
||||||
# else
|
|
||||||
# define UNITS_THROW(x) throw x
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# define UNITS_THROW(x) \
|
|
||||||
do { \
|
|
||||||
FMT_ASSERT(false, (x).what()); \
|
|
||||||
} while (false)
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user