Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to pass 'no type' to a function? #344

Open
sam-apparance opened this issue Sep 2, 2022 · 0 comments
Open

Best way to pass 'no type' to a function? #344

sam-apparance opened this issue Sep 2, 2022 · 0 comments

Comments

@sam-apparance
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant