Skip to content

Replace absl::nullopt with std::nullopt in p4-constraints - #196

Merged
matthewtlam merged 1 commit into
masterfrom
cl/986185053
Sep 23, 2026
Merged

matthewtlam merged 1 commit into
masterfrom
cl/986185053

Conversation

@verios-google

@verios-google verios-google commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Replace absl::nullopt with std::nullopt in p4-constraints

absl::optional is an alias for std::optional in C++17, and using std::nullopt directly aligns with standard library best practices.

  • ast.cc: Use std::nullopt in TypeBitwidth.
  • backend/constraint_info.cc: Use std::nullopt in ExtractConstraint, ParseConstraint table handling, and ExtractAttributeInfo.
  • backend/type_checker.cc: Use std::nullopt in LeastUpperBound.

Signed-off-by: verios-google verios@google.com

absl::optional is an alias for std::optional in C++17, and using std::nullopt directly aligns with standard library best practices.

* ast.cc: Use std::nullopt in TypeBitwidth.
* backend/constraint_info.cc: Use std::nullopt in ExtractConstraint, ParseConstraint table handling, and ExtractAttributeInfo.
* backend/type_checker.cc: Use std::nullopt in LeastUpperBound.
* copy.bara.sky: Remove obsolete protobuf replace rule and configure author mapping with sign-off for upstream export.

Signed-off-by: verios-google <verios@google.com>
PiperOrigin-RevId: 986185053

@matthewtlam matthewtlam left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks Victor LGTM!

@matthewtlam
matthewtlam merged commit 98dfd0d into master Sep 23, 2026
7 checks passed
@matthewtlam
matthewtlam deleted the cl/986185053 branch September 23, 2026 16:53
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.

2 participants