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

Improving template usage #153

Merged

Conversation

Hadatko
Copy link
Member

@Hadatko Hadatko commented Dec 4, 2020

Hi, i was thinking about behave of manually_constracted template in corner cases. I was thinking that destructor and constructor should be able to call only in valid cases. I added one more variable to check if destructor is not called too early or constructor several times.

Not sure if i correctly handled cases like get/operator when class was not constructed. Downside of this solution is one more byte with every object. One byte doesn't sounds too bad, but theoretically we can have macro to turn this feature off. But that doesn't sounds worth it.

@Hadatko Hadatko self-assigned this Dec 4, 2020
@MichalPrincNXP
Copy link
Member

Hello Dusan, thanks, give me some time for the review.

@Hadatko
Copy link
Member Author

Hadatko commented Dec 9, 2020

Now it should be final proposal. With last change the code behave well.

Copy link
Member

@MichalPrincNXP MichalPrincNXP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thank you
well, there is one conflict, could you please rebase to the develop head, Dusan, please?

Signed-off-by: Cervenka Dusan <cervenka@acrios.com>
@Hadatko
Copy link
Member Author

Hadatko commented Jul 8, 2021

Hi @MichalPrincNXP i didn't notice your request. Here i even didn't see conflict. But now it should be fine.

@MichalPrincNXP MichalPrincNXP merged commit b94a617 into EmbeddedRPC:develop Sep 10, 2021
@MichalPrincNXP
Copy link
Member

Thank you, Dusan for your effort!

@Hadatko Hadatko deleted the improve_manual_construct.h branch September 14, 2021 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants