Utility to map from an std::variant<...> and map a TYPE to its underlying index in the given variant
\note Considered doing this as a function, so could take optional argument and use to figure out
type of VARIANT_VALUE, but frequently used in constexpr setting where this probably would
be helpful (see below example).
- Example Usage
variant<filesystem::path, BLOB, String> fSourceData_;
template <typename T>
static constexpr size_t VariantIndex_ = VariantIndex<decltype(fSourceData_), T>;
...
switch (fSourceData_.index ()) {
case VariantIndex_<filesystem::path>:
case VariantIndex_<BLOB>:
case VariantIndex_<String>:
default:
return {};
}
#define AssertNotReached()
Ptr New(const InputStream::Ptr< byte > &src, optional< AutomaticCodeCvtFlags > codeCvtFlags={}, optional< SeekableFlag > seekable={}, ReadAhead readAhead=eReadAheadAllowed)
Create an InputStream::Ptr<Character> from the arguments (usually binary source) - which can be used ...