-
Notifications
You must be signed in to change notification settings - Fork 5
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
Using of return operator. #3
Comments
See similar approach proposed for scoped locks: https://groups.google.com/g/comp.lang.c/c/KPeoMxlTqjI/m/ISz5IBifBgAJ |
Hey there,
thank you very much. This is a really cool idea!
I am currently in the process of moving to a new apartment, so I'll only have time to look at it in detail after the weekend.
I'll get back to you then.
Cheers!
~Marten/Qqwy
On March 18, 2022 2:14:52 PM UTC, Kirill Frolov ***@***.***> wrote:
See similar approach proposed for scoped locks: https://groups.google.com/g/comp.lang.c/c/KPeoMxlTqjI/m/ISz5IBifBgAJ
--
Reply to this email directly or view it on GitHub:
#3 (comment)
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
Met vriendelijke groet / Sincerely,
~W-M
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello...
I have a proposition.
You can redefine
return
operator to an expression like:Then you globally define
some_var
withsome_type
and locallly (in each function, via macros providing RAII) you re-declaringsome_var
withsome_type2
. Wheresome_type
andsome_type2
must be defined just liketypedef struct { int dummy[1]; } some_type
.As a result, you will get compile error if you will try to perform return from block of code where RAII is assumed.
The text was updated successfully, but these errors were encountered: