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

Experimental: literal for invalid header #3667

Merged
merged 3 commits into from
Nov 10, 2022

Conversation

mihaibudiu
Copy link
Contributor

Signed-off-by: Mihai Budiu [email protected]
This is a prerequisite for finalizing the implementation of the ... default initialization operator.

@mihaibudiu
Copy link
Contributor Author

mihaibudiu commented Nov 5, 2022

I have chosen the syntax (H){#} to denote an invalid header with type H.
We should debate this during the next LDWG meeting.

Mihai Budiu added 2 commits November 4, 2022 18:12
@vgurevich
Copy link

vgurevich commented Nov 5, 2022

Overall the syntax looks reasonable.

So, it is true that these two will be equivalent:

header.setInvalid();

and

header = (header_t){#};

Given that we are only assigning the validity bit, I wonder if {#} should be automatically cast-able to any header type

@mihaibudiu
Copy link
Contributor Author

They are equivalent

Copy link
Contributor

@jafingerhut jafingerhut left a comment

Choose a reason for hiding this comment

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

The syntax looks reasonable to me. I say go for it!

@mihaibudiu
Copy link
Contributor Author

In the spirit of past experiments I will actually merge this PR.

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

Successfully merging this pull request may close these issues.

3 participants