Improve Configuration
I realized we can be smarter about the getting of values:
- Let's do the casting business directly with
config::Value
- Let's merge the
std::vector<T>
stuff with the rest, we can access the vector type viaT::value_type
- Added support for
MsgPack::type::BIN
viastd::vector<char>
. I consideredstd::byte
as alternative, but you can't even fill a vector with an initializer list - it's terrible. - Support setting strings from
char[N]
andstd::string_view
. - better handle
NIL
/std::monostate
, e.g. by returning an empty vector when accessing astd::monostate
element as vector - this is how we build it from MsgPack, no type is kept (msgpack would allow for a different type in every array entry).
This will let also other code (e.g, using Dictionary
or List
directly) make use of the casting business.
Open questions:
-
Should we also do overflow checking when casting values into narrower types in Value::get()
?
This should solve #17