mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-28 06:25:49 +00:00
Simplify strHex:
Problem: - There are several specific overloads with some custom code that can be easily replaced using Boost.Hex. Solution: - Introduce `strHex(itr, itr)` to return a string given a begin and end iterator. - Remove `strHex(itr, size)` in favor of the `strHex(T)` where T is something that has a `begin()` member function. This allows us to remove the strHex overloads for `std::string`, Blob, and Slice.
This commit is contained in:
@@ -510,7 +510,7 @@ inline const base_uint<Bits, Tag> operator+ (
|
||||
template <std::size_t Bits, class Tag>
|
||||
inline std::string to_string (base_uint<Bits, Tag> const& a)
|
||||
{
|
||||
return strHex (a.begin (), a.size ());
|
||||
return strHex (a.cbegin (), a.cend ());
|
||||
}
|
||||
|
||||
// Function templates that return a base_uint given text in hexadecimal.
|
||||
|
||||
Reference in New Issue
Block a user