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

Bugfixes for <any> #3965

Merged
merged 23 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion tests/std/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ tests\GH_003676_format_large_hh_mm_ss_values
tests\GH_003735_char_traits_signatures
tests\GH_003840_tellg_when_reading_lf_file_in_text_mode
tests\GH_003867_output_nan
tests\GH_003965_robust_against_adl_any
tests\LWG2381_num_get_floating_point
tests\LWG2597_complex_branch_cut
tests\LWG3018_shared_ptr_function
Expand Down
4 changes: 0 additions & 4 deletions tests/std/tests/GH_003965_robust_against_adl_any/env.lst
achabense marked this conversation as resolved.
Outdated
Show resolved Hide resolved

This file was deleted.

39 changes: 0 additions & 39 deletions tests/std/tests/GH_003965_robust_against_adl_any/test.cpp

This file was deleted.

22 changes: 22 additions & 0 deletions tests/std/tests/P0220R1_any/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3184,6 +3184,27 @@ namespace msvc {
}
#pragma warning(pop)
} // namespace trivial

namespace gh_140_robust_against_adl {
struct incomplete;

template <class T>
struct wrapper {
T t;
};

void run_test() {
using _trivial = wrapper<incomplete>*;
using _small = std::pair<_trivial, small>;
using _large = std::pair<_trivial, large>;

globalMemCounter.disable_allocations = true;
any a{_trivial{}};
any b{_small{}};
globalMemCounter.disable_allocations = false;
any c{_large{}};
}
} // namespace gh_140_robust_against_adl
} // namespace msvc

int main() {
Expand Down Expand Up @@ -3220,4 +3241,5 @@ int main() {
msvc::size_and_alignment::run_test();
msvc::small_type::run_test();
msvc::trivial::run_test();
msvc::gh_140_robust_against_adl::run_test();
achabense marked this conversation as resolved.
Show resolved Hide resolved
}