Skip to content

Replace definition of value_sett::object_map_dt #4694

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

Merged
merged 2 commits into from
May 23, 2019

Conversation

romainbrenguier
Copy link
Contributor

Instead of defining a new class with the same interface as std::map and
which use std::map internally, we use using and define outside the
static field blank which is the only thing added to std::map.

  • Each commit message has a non-empty body, explaining why the change was made.
  • [na] Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • [na] The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • [na] My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • [na] White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link
Contributor

@smowton smowton left a comment

Choose a reason for hiding this comment

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

s/blank/empty, otherwise lgtm

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

clang-format isn't happy and +1 on using empty_object_map instead of blank_object_map, otherwise looks good, another nice piece of cleanup!

This is so that the class can be used by types that do not have a static
`blank` field. A particular case which would be useful in our codebase
is std::map.
Instead of defining a new class with the same interface as std::map and
which use std::map internally, we use using and define outside the
static field `blank` which is the only thing added to std::map.
This simplifies a lot the code in the value_set class header.
@romainbrenguier romainbrenguier merged commit 1ab9a7f into diffblue:develop May 23, 2019
@romainbrenguier romainbrenguier deleted the clean-up/value-set2 branch May 23, 2019 08:49
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 24, 2019
This was removed recently in pull request diffblue#4694 but it
seems necessary when compiling with clang which would complain about it
not being defined.
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 24, 2019
The explicit definition of object_mapt equality was removed recently in
pull request diffblue#4694 but it seems necessary when compiling
with clang which would complain about it not being defined.
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 24, 2019
The explicit definition of object_mapt equality was removed recently in
pull request diffblue#4694 but it seems necessary when compiling
with clang which would complain about it not being defined.

Should fix diffblue#4699
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 24, 2019
The explicit definition of object_mapt equality was removed recently in
pull request diffblue#4694 but it seems necessary when compiling
with clang which would complain about it not being defined.

Should fix diffblue#4699
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 24, 2019
The explicit definition of object_mapt equality was removed recently in
pull request diffblue#4694 but it seems necessary when compiling
with clang which would complain about it not being defined.

Should fix diffblue#4699
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 24, 2019
The explicit definition of object_mapt equality was removed recently in
pull request diffblue#4694 but it seems necessary when compiling
with clang which would complain about it not being defined.

Should fix diffblue#4699
romainbrenguier added a commit to romainbrenguier/cbmc that referenced this pull request May 28, 2019
The explicit definition of object_mapt equality was removed recently in
pull request diffblue#4694 but it seems necessary when compiling
with clang which would complain about it not being defined.

Should fix diffblue#4699
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