I'd like to be able to specify 'no type' as a functions rttr::type parameter and it seems that an invalid type object would make sense here. Even though there is a rttr::type::is_valid() method for checking types are valid it's not clear how to create one or the best way to yield one. Currently I'm using rttr::type::get() as my 'no type' value and comparing explicitly. I guess I could pass a pointer to an rttr::type but this seems an uncomfortable switch from passing rttr::type's around by value everywhere (as I believe they are designed). Any ideas?
I'd like to be able to specify 'no type' as a functions rttr::type parameter and it seems that an invalid type object would make sense here. Even though there is a rttr::type::is_valid() method for checking types are valid it's not clear how to create one or the best way to yield one. Currently I'm using rttr::type::get() as my 'no type' value and comparing explicitly. I guess I could pass a pointer to an rttr::type but this seems an uncomfortable switch from passing rttr::type's around by value everywhere (as I believe they are designed). Any ideas?