diff --git a/ciphers/uint128_t.hpp b/ciphers/uint128_t.hpp index c11c881c1..b30ef2429 100644 --- a/ciphers/uint128_t.hpp +++ b/ciphers/uint128_t.hpp @@ -85,6 +85,9 @@ class uint128_t { public: uint128_t() = default; + template ::value, T>::type> + explicit uint128_t(T low) : s(low), f(0) {} /** * @brief Parameterized constructor * @param low lower part 8-bit unisgned integer diff --git a/ciphers/uint256_t.hpp b/ciphers/uint256_t.hpp index d4afcb6af..6e81af8bd 100644 --- a/ciphers/uint256_t.hpp +++ b/ciphers/uint256_t.hpp @@ -65,6 +65,10 @@ class uint256_t { // Constructors uint256_t() = default; + template ::value, T>::type> + explicit uint256_t(T low) : s(low), f(0) {} + /** * @brief Parameterized constructor * @param low lower part 8-bit unisgned integer