diff --git a/include/dpp/managed.h b/include/dpp/managed.h index 4d89a5d84b..86188f7da8 100644 --- a/include/dpp/managed.h +++ b/include/dpp/managed.h @@ -41,19 +41,19 @@ namespace dpp { /** * @brief Constructor, initialises id to 0. */ - constexpr managed() noexcept = default; + managed() = default; /** * @brief Constructor, initialises ID * @param nid ID to set */ - constexpr managed(const snowflake nid) noexcept : id{nid} {} + managed(const snowflake nid) : id{nid} {} /** * @brief Copy constructor * @param rhs Object to copy */ - constexpr managed(const managed &rhs) noexcept = default; + managed(const managed &rhs) = default; /** * @brief Move constructor @@ -61,24 +61,24 @@ namespace dpp { * Effectively equivalent to copy constructor * @param rhs Object to move from */ - constexpr managed(managed &&rhs) noexcept = default; + managed(managed &&rhs) = default; /** * @brief Destroy the managed object */ - virtual ~managed() noexcept = default; + virtual ~managed() = default; /** * @brief Copy assignment operator * @param rhs Object to copy */ - constexpr managed &operator=(const managed& rhs) noexcept = default; + managed &operator=(const managed& rhs) = default; /** * @brief Move assignment operator * @param rhs Object to move from */ - constexpr managed &operator=(managed&& rhs) noexcept = default; + managed &operator=(managed&& rhs) = default; /** * @brief Get the creation time of this object according to Discord. diff --git a/include/dpp/snowflake.h b/include/dpp/snowflake.h index 40cbe0e268..f6739a4bc0 100644 --- a/include/dpp/snowflake.h +++ b/include/dpp/snowflake.h @@ -77,7 +77,7 @@ class DPP_EXPORT snowflake final { * @throw dpp::logic_exception on assigning a negative value. The function is noexcept if the type given is unsigned * @param snowflake_val snowflake value as an integer type */ - template >> + template && !std::is_same_v>> constexpr snowflake(T snowflake_val) noexcept(std::is_unsigned_v) : value(static_cast>(snowflake_val)) { /** * we cast to the unsigned version of the type given - this maintains "possible loss of data" warnings for sizeof(T) > sizeof(value)