Open BenWibking opened 3 weeks ago
@Yurlungur is there a reason for a custom Params container? Could this be replaced with a wrapper around a std::unordered_map<std::string, std::any>
?
Although I see that std::any
only works for copy-constructible objects...
Thanks for taking a stab at this!
@Yurlungur is there a reason for a custom Params container? Could this be replaced with a wrapper around a
std::unordered_map<std::string, std::any>
?
We wrote Params
when Parthenon was C++14 only. So at the time it wasn't an option. In principle, I think it could be replaced with std::any
modulo the issue with copy constructible types.
I am somewhat concerned also about how this will interact with I/O. In principle it should all work though.
PR Summary
When
Param
s are created or updated, it takes ownership of the object passed withstd::move
.PR Checklist