diff options
author | clyne <clyne@bitgloo.com> | 2021-10-12 14:31:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 14:31:51 -0400 |
commit | b1edf2867c9e4cbfff991225031c2a218363e661 (patch) | |
tree | 546bec9158fe6fb2aec73b000764e78d80ab3c12 | |
parent | 6b2828c6f0fd766a9475b668616d4f49dff16a56 (diff) |
-rw-r--r-- | include/consteval_huffman/consteval_huffman.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/consteval_huffman/consteval_huffman.hpp b/include/consteval_huffman/consteval_huffman.hpp index 0c41913..e3d92d5 100644 --- a/include/consteval_huffman/consteval_huffman.hpp +++ b/include/consteval_huffman/consteval_huffman.hpp @@ -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_ |