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

Generic usage of "assert impl"? Why is assert_impl not public? #61

Open
bluenote10 opened this issue Nov 9, 2024 · 1 comment
Open

Comments

@bluenote10
Copy link

I'm trying to figure out if it is possible to use the "assert impl" macro family in a generic way. Something like:

static_assertions::assert_impl_all!(for(T) MyType<T>: SomeTrait);

It looks like assert_impl_all or assert_impl_any do not allow this kind of generic syntax, but looking at the internal tests it seems that the private assert_impl macro does. Would it be possible to make assert_impl public to enable such generic usages publicly?

@cyrilleberger
Copy link

I had the same problem. After looking deeper, it seems to be that assert_impl and generic are not in the 1.1.0 release, and were added after. Someone has released a new version of static_assertions as static_assertions_next and the assert_impl macro is available in that fork.

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

2 participants