diff --git a/include/toml11/get.hpp b/include/toml11/get.hpp index 3805d09..ecf62c7 100644 --- a/include/toml11/get.hpp +++ b/include/toml11/get.hpp @@ -398,6 +398,25 @@ get(const basic_value& v) cxx::make_index_sequence::value>{}); } +// ============================================================================ +// std::unordered_set + +template +cxx::enable_if_t::value, T> +get(const basic_value& v) +{ + using value_type = T; + const auto& a = v.as_array(); + + std::unordered_set container; + for (const auto& elem : a) + { + container.insert(get(elem)); + } + return container; +} + + // ============================================================================ // map-like types; most likely STL map, like std::map or std::unordered_map.