Unverified Commit 01c37e0a authored by MarcDirven's avatar MarcDirven Committed by GitHub

Added check for `-mbig-obj` and ref qualifier check (#1929)

* Added check whether mingw has -mbig-obj flag
* Removed ref qualifiers
parent a5e7e7db
......@@ -199,7 +199,10 @@ if (HAVE_STRTOD_L)
endif ()
if (MINGW)
target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
check_cxx_compiler_flag("Wa,-mbig-obj" FMT_HAS_MBIG_OBJ)
if (${FMT_HAS_MBIG_OBJ})
target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
endif()
endif ()
if (FMT_WERROR)
......
......@@ -828,7 +828,7 @@ struct FMT_EXTERN_TEMPLATE_API uint128_wrapper {
uint64_t high() const FMT_NOEXCEPT { return uint64_t(internal_ >> 64); }
uint64_t low() const FMT_NOEXCEPT { return uint64_t(internal_); }
uint128_wrapper& operator+=(uint64_t n) & FMT_NOEXCEPT {
uint128_wrapper& operator+=(uint64_t n) FMT_NOEXCEPT {
internal_ += n;
return *this;
}
......@@ -842,7 +842,7 @@ struct FMT_EXTERN_TEMPLATE_API uint128_wrapper {
uint64_t high() const FMT_NOEXCEPT { return high_; }
uint64_t low() const FMT_NOEXCEPT { return low_; }
uint128_wrapper& operator+=(uint64_t n) & FMT_NOEXCEPT {
uint128_wrapper& operator+=(uint64_t n) FMT_NOEXCEPT {
# if defined(_MSC_VER) && defined(_M_X64)
unsigned char carry = _addcarry_u64(0, low_, n, &low_);
_addcarry_u64(carry, high_, 0, &high_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment