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

DM-28697: clean up include structure to guard against ODR violations #565

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TallJimbo
Copy link
Member

No description provided.

The compound field types that once used these are gone, so the only
place we need them is in the backwards-compatibility reading code.
This commit guards against one-definition rule violations involving
explicit specializations of the Key, KeyBase, and FieldBase classes by
moving those specializations next to the default definitions of those
templates and generally making includes more "self-sufficient":
headers should now (at least mostly) include the headers for all
classes they use directly, and should not rely on other headers being
included for them in any source files (but that is always difficult to
check).  In a few cases I do assume that some headers (e.g. Schema.h)
can be relied upon to include others (Key.h, Field.h) in higher-level
code.

This also removes a few includes that were not being used in those
headers at all.  That could cause downstream compile failures if
source files or other headers were (incorrectly) relying on those
incorrect includes, but such breakage should be easy to fix and is
worth fixing anyway.
We no longer have any compound keys - they've been replaced by the
FunctorKey concept instead.  This lets us simplify a lot of code,
especially in Schema.cc.
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.

1 participant