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

Remove misleading comments about ABI compatibility for nostd::span #1731

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions api/include/opentelemetry/nostd/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ class span<T, dynamic_extent>
T *end() const noexcept { return data_ + extent_; }

private:
// Note: matches libstdc++'s layout for std::span
Copy link
Contributor

Choose a reason for hiding this comment

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

But it seems the definition here does provide the ABI compatibility as libc++, do you mean this is unnecessary?

Copy link
Member Author

@marcalff marcalff Nov 2, 2022

Choose a reason for hiding this comment

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

It was compatible with one version of libc++ at one point, but the library implementation changed other time.

We can't guarantee ABI compatibility with a moving target, so we should not claim or hint it is compatible.

// See
// https://github.com/gcc-mirror/gcc/blob/a60701e05b3878000ff9fdde1aecbc472b9dec5a/libstdc%2B%2B-v3/include/std/span#L402-L403
size_t extent_;
T *data_;
};
Expand Down