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

Feature request: show substitution failures #423

Closed
eyalroz opened this issue Nov 10, 2021 · 6 comments
Closed

Feature request: show substitution failures #423

eyalroz opened this issue Nov 10, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@eyalroz
Copy link

eyalroz commented Nov 10, 2021

It would be nice if cppinsights could print what items in an overload set were rejected due to substitution failure (for illustrating how SFINAE constructs work).

@eyalroz eyalroz changed the title Feature request: substitution failures Feature request: show substitution failures Nov 10, 2021
@andreasfertig
Copy link
Owner

Hello @eyalroz,

interesting idea. I don' know whether that is possible.

Let's assume it would be possible. How would you like them to be presented? What makes template errors so annoying is the compiler telling us all the overloads it tried.

Best,

Andreas

@andreasfertig andreasfertig added enhancement New feature or request awaiting-followup Waiting for more input labels Nov 15, 2021
@eyalroz
Copy link
Author

eyalroz commented Nov 15, 2021

Well, initially, and assuming this would possible, I would just like the signatures of the overload-set members for which substitution failed, without listing the failure reason. Remember that the annoying long warning messages are mostly due to showing the entire instantiation "stack" down to where the actual failure occurred. If you only show the outer-level, it should be less painful to go through. But it would be quite useful for debugging template programming issues! Plus, it's part of how your project presents itself: "the magic the compiler does for us to make things work." - sometimes the magic can get somewhat verbose.

@stale
Copy link

stale bot commented Apr 16, 2022

Thanks for contributing to this issue. As it has been 60 days since the last activity waiting for a followup. This issue will be automatically closed in 7 days, if no further activity occurs. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please respond before the issue is closed. We'll gladly take a look again! In any case, thank you for your contributions!

@stale stale bot added the stale No activity label Apr 16, 2022
@eyalroz
Copy link
Author

eyalroz commented Apr 16, 2022

That doesn't seem fair.

@stale stale bot removed the stale No activity label Apr 16, 2022
@andreasfertig
Copy link
Owner

Hello @eyalroz,

yes, sorry I forgot to remove the tag.

Anyhow, so far I haven't found a way getting this overload set.

Andreas

@andreasfertig andreasfertig removed the awaiting-followup Waiting for more input label Apr 19, 2022
@andreasfertig
Copy link
Owner

Hello @eyalroz,

I still haven't found a way to get this overload set. I'm closing this issue now. If anybody has an implementation, I'm happy to reopen it.

Andreas

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

No branches or pull requests

2 participants