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

Add read_raw and prepare to deprecate read(T*, ...). #928

Merged
merged 6 commits into from
Feb 5, 2024
Merged

Conversation

1uc
Copy link
Collaborator

@1uc 1uc commented Jan 29, 2024

No description provided.

Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (d047891) 86.12% compared to head (dc5888c) 86.13%.

Files Patch % Lines
src/examples/read_write_raw_ptr.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #928   +/-   ##
=======================================
  Coverage   86.12%   86.13%           
=======================================
  Files          89       89           
  Lines        5854     5857    +3     
=======================================
+ Hits         5042     5045    +3     
  Misses        812      812           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@1uc
Copy link
Collaborator Author

1uc commented Jan 29, 2024

Unfortunately deprecating this is very noisy and misleading, since int a[][] = {{1, 2}, {3, 4}} uses the deprecated overload. This pattern doesn't need to be modernized to use read_raw since, once read(T* is removed the read(T& will be pickup instead, which seems like the preferred overload, since in read_raw(T*, T should be deduced as int not int[].

@1uc 1uc changed the title Add read_raw and deprecate raw(T*, ...). Add read_raw and prepare to deprecate read(T*, ...). Jan 29, 2024
@1uc 1uc marked this pull request as ready for review January 30, 2024 07:48
1uc added 5 commits January 30, 2024 14:39
These cases are modernized to silence the compiler. These semantically,
don't write a from a raw pointer. However, the compiler picks the
overload for pointers in these cases and it kinda works.
@alkino alkino merged commit 0435f09 into master Feb 5, 2024
36 checks passed
@alkino alkino deleted the 1uc/read_raw branch February 5, 2024 08:30
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