Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions include/boost/int128/detail/int128_imp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ int128_t

// Prefix and postfix increment
constexpr int128_t& operator++() noexcept;
constexpr int128_t& operator++(int) noexcept;
constexpr int128_t operator++(int) noexcept;

// Prefix and postfix decrment
constexpr int128_t& operator--() noexcept;
constexpr int128_t& operator--(int) noexcept;
constexpr int128_t operator--(int) noexcept;

// Compound Addition
template <BOOST_INT128_DEFAULTED_INTEGER_CONCEPT>
Expand Down Expand Up @@ -2005,14 +2005,11 @@ constexpr int128_t& int128_t::operator++() noexcept
return *this;
}

constexpr int128_t& int128_t::operator++(int) noexcept
constexpr int128_t int128_t::operator++(int) noexcept
{
if (++low == UINT64_C(0))
{
++high;
}

return *this;
const auto temp {*this};
++(*this);
return temp;
}

//=====================================
Expand All @@ -2029,14 +2026,11 @@ constexpr int128_t& int128_t::operator--() noexcept
return *this;
}

constexpr int128_t& int128_t::operator--(int) noexcept
constexpr int128_t int128_t::operator--(int) noexcept
{
if (low-- == UINT64_C(0))
{
--high;
}

return *this;
const auto temp {*this};
--(*this);
return temp;
}

//=====================================
Expand Down
16 changes: 10 additions & 6 deletions include/boost/int128/detail/uint128_imp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ uint128_t
#endif // BOOST_INT128_HAS_MSVC_INT128

constexpr uint128_t& operator++() noexcept;
constexpr uint128_t& operator++(int) noexcept;
constexpr uint128_t operator++(int) noexcept;
constexpr uint128_t& operator--() noexcept;
constexpr uint128_t& operator--(int) noexcept;
constexpr uint128_t operator--(int) noexcept;

// Compound Addition
template <BOOST_INT128_DEFAULTED_INTEGER_CONCEPT>
Expand Down Expand Up @@ -2035,9 +2035,11 @@ constexpr uint128_t& uint128_t::operator++() noexcept
return *this;
}

constexpr uint128_t& uint128_t::operator++(int) noexcept
constexpr uint128_t uint128_t::operator++(int) noexcept
{
return ++(*this);
const auto temp {*this};
++(*this);
return temp;
}

//=====================================
Expand All @@ -2054,9 +2056,11 @@ constexpr uint128_t& uint128_t::operator--() noexcept
return *this;
}

constexpr uint128_t& uint128_t::operator--(int) noexcept
constexpr uint128_t uint128_t::operator--(int) noexcept
{
return --(*this);
const auto temp {*this};
--(*this);
return temp;
}

//=====================================
Expand Down
Loading