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

Use destroy_at to call explicit destructor in make_inner_n #263

Merged

Conversation

colugomusic
Copy link
Contributor

This fixes the MSVC madness I was experiencing before. This compiles in both C++17 and C++20 mode.

@codecov-commenter
Copy link

Codecov Report

Merging #263 (daff650) into master (21cc60e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@           Coverage Diff           @@
##           master     #263   +/-   ##
=======================================
  Coverage   90.50%   90.51%           
=======================================
  Files         119      119           
  Lines       12121    12122    +1     
=======================================
+ Hits        10970    10972    +2     
+ Misses       1151     1150    -1     
Impacted Files Coverage Δ
immer/detail/hamts/node.hpp 81.32% <100.00%> (+0.18%) ⬆️

Copy link
Owner

@arximboldi arximboldi left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this! ❤️

Comment on lines +23 to +26
// For C++14 support.
// Calling the destructor inline breaks MSVC in some obscure
// corner cases.
template <typename T> constexpr void destroy_at(T* p) { p->~T(); }
Copy link
Owner

Choose a reason for hiding this comment

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

So just having this is enough to make MSVC work? 🤣 What a joke of a compiler...

@arximboldi arximboldi merged commit 0b3aaf6 into arximboldi:master May 25, 2023
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