Skip to content

Provide a C++17-compatible base implementation#1

Merged
supervacuus merged 2 commits intogetsentryfrom
cxx17_tracking
Jan 10, 2025
Merged

Provide a C++17-compatible base implementation#1
supervacuus merged 2 commits intogetsentryfrom
cxx17_tracking

Conversation

@supervacuus
Copy link
Copy Markdown
Collaborator

Used to track upstream main but keep C++17 compatibility.

* use our own implementation of is_constant_evaluated() that defers to __builtin_is_constant_evaluated() for clang and gcc and returns false in all other cases.
* replace all occurences of `requires` with a comparable SFINAE `std::enable_if` template declaration.
* replace all uses of `std::span` with `base::span`.
* provide an implementation `BitCast` which is trivial implementation of `std::bit_cast`, that does a `memcpy` and static size and type checking and replace all uses of the standardized version.
* revert `span.h` to the version from before it used std::ranges throughout.
Copy link
Copy Markdown
Member

@JoshuaMoelans JoshuaMoelans left a comment

Choose a reason for hiding this comment

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

lgtm!

@supervacuus supervacuus merged commit fa9b438 into getsentry Jan 10, 2025
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