calling is_enum on an interface typedef throws an exception
Closed this issue · 1 comments
for (auto const& type : db.TypeDef) {
std::cout << (type.is_enum() ? "enum " : "class ") << type.TypeName() << std::endl;
...
}
winmd2markdown.exe!winmd::impl::throw_invalid(const std::string & message) Line 47 C++
winmd2markdown.exe!winmd::reader::table_base::get_value(const unsigned int row, const unsigned int column) Line 43 C++
winmd2markdown.exe!winmd::reader::row_basewinmd::reader::TypeDef::get_string(const unsigned int column) Line 545 C++
winmd2markdown.exe!winmd::reader::TypeDef::TypeNamespace() Line 61 C++
winmd2markdown.exe!winmd::reader::get_type_namespace_and_name(const winmd::reader::coded_index & type) Line 9 C++
winmd2markdown.exe!winmd::reader::get_base_class_namespace_and_name(const winmd::reader::TypeDef & type) Line 25 C++
winmd2markdown.exe!winmd::reader::extends_type(winmd::reader::TypeDef type, std::basic_string_view<char,std::char_traits> typeNamespace, std::basic_string_view<char,std::char_traits> typeName) Line 30 C++
winmd2markdown.exe!winmd::reader::TypeDef::is_enum() Line 119 C++
winmd2markdown.exe!main() Line 56 C++
The is_enum
method is not meant to be used on arbitrary TypeDef
s. It is only used for signature parsing. You can use the get_category
method to determine what a TypeDef
represents.
winmd/src/impl/winmd_reader/cache.h
Lines 33 to 60 in 6eb23fe