add huffman_compress_array helper

master
Clyne 3 years ago committed by GitHub
parent 6b2828c6f0
commit b1edf2867c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -390,4 +390,17 @@ constexpr auto operator ""_huffman()
template <detail::huffman_string_container hsc>
constexpr auto huffman_compress = huffman_compressor<hsc>();
namespace detail
{
template <typename T, T... list>
class huffman_compress_array_container {
private:
constexpr static T uncompressed[] = {list...};
public:
constexpr static auto data = huffman_compress<uncompressed>;
};
}
template <typename T, T... list>
constexpr auto huffman_compress_array = detail::huffman_compress_array_container<T, list...>::data;
#endif // TCSULLIVAN_CONSTEVAL_HUFFMAN_HPP_

Loading…
Cancel
Save