
10 Dec
2024
10 Dec
'24
12:10 a.m.
Zach Laine wrote:
One example is digest<>. The docs say, "digest<N> is a constexpr-friendly class template similar to std::array
. It is used to store the resulting message digest of hash algorithms such as SHA2-256 or RIPEMD- 160.". So, exactly like C++17 std::array then? :)
Almost. Most of std::array does indeed become constexpr in C++17, except for comparisons. For those you have to wait until C++20. digest<> also has operator<< and to_string.