https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
--- Comment #7 from Andrew Pinski ---
The issue is we don't do any overload resolution for the function in cleanup
attribute; most likely because the attribute was originally added for C. Also
in C++ you could just use a wrapper class to do the
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
--- Comment #6 from paradox_ptr at protonmail dot ch ---
(In reply to Martin Sebor from comment #4)
> I'm curious about the use case: can you describe what you are using
> the attribute for in C++?
I don't have a meaningful use case for you.
Was
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
--- Comment #5 from Jonathan Wakely ---
For now I suggest this patch for the docs:
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -6815,6 +6815,11 @@ does not allow the exception to be caught, only to
perform an action.
It is undefined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
Martin Sebor changed:
What|Removed |Added
CC||msebor at gcc dot gnu.org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
--- Comment #3 from paradox_ptr at protonmail dot ch ---
> Well you didn't instantiate it. 'cu' is not a function, it's a template.
Sure. There is not enough information for the compiler to deduce the type
without <>.
> IMHO it's completely unne
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
Jonathan Wakely changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89299
--- Comment #1 from Jonathan Wakely ---
That attribute doesn't really make sense in C++, because you have destructors
anyway, so I would think that making it work with C++ templates is very low
priority.