frozen::unordered_multiset?
davidson16807 opened this issue · 1 comments
What would be required to create the frozen equivalent of unordered_multiset?
I'm asking since I think the existence of such a thing could allow for creating nice and easy compile-time unit libraries akin to mpusz/units or benri:
constexpr frozen::unordered_multiset<frozen::string, int, 1> mass = {{"mass", 1}};
constexpr frozen::unordered_multiset<frozen::string, int, 2> acceleration = {{"length", 1}, {"time", -2}};
constexpr auto force = combine(mass, acceleration);
Personally, if I'm writing a software framework that relies on a dimensional type system I'd much rather rely on a low lying abstraction like a frozen::unordered_multiset
rather than force users to add one of these units libraries to their list of dependencies.
Let's consider the case of an unordered_multimap
that brings the unordered_multiset
for free. An option could be to implement it as an unordered_multimap
with a cvector
with the appropriate bound derived from the intializer.