diff --git a/stl/inc/xhash b/stl/inc/xhash index 21f0901e8..3c8a7bbab 100644 --- a/stl/inc/xhash +++ b/stl/inc/xhash @@ -1841,6 +1841,7 @@ protected: } } + template = 0> _NODISCARD bool _Multi_equal(const _Hash& _Right) const { static_assert(_Traits::_Multi, "This function only works with multi containers"); _STL_INTERNAL_CHECK(this->size() == _Right.size()); diff --git a/tests/std/test.lst b/tests/std/test.lst index 9ce3742fc..f23814ec9 100644 --- a/tests/std/test.lst +++ b/tests/std/test.lst @@ -174,6 +174,7 @@ tests\GH_001123_random_cast_out_of_range tests\GH_001411_core_headers tests\GH_001530_binomial_accuracy tests\GH_001541_case_sensitive_boolalpha +tests\GH_001638_dllexport_derived_classes tests\LWG2597_complex_branch_cut tests\LWG3018_shared_ptr_function tests\P0019R8_atomic_ref diff --git a/tests/std/tests/GH_001638_dllexport_derived_classes/env.lst b/tests/std/tests/GH_001638_dllexport_derived_classes/env.lst new file mode 100644 index 000000000..f141421b2 --- /dev/null +++ b/tests/std/tests/GH_001638_dllexport_derived_classes/env.lst @@ -0,0 +1,4 @@ +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +RUNALL_INCLUDE ..\impure_matrix.lst diff --git a/tests/std/tests/GH_001638_dllexport_derived_classes/test.compile.pass.cpp b/tests/std/tests/GH_001638_dllexport_derived_classes/test.compile.pass.cpp new file mode 100644 index 000000000..3989d13f8 --- /dev/null +++ b/tests/std/tests/GH_001638_dllexport_derived_classes/test.compile.pass.cpp @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if _HAS_CXX20 +#include +#endif // _HAS_CXX20 + +using namespace std; + +int main() {} // COMPILE-ONLY + +#pragma warning(disable : 4251) // class 'A' needs to have dll-interface to be used by clients of class 'B' +#pragma warning(disable : 4275) // non dll-interface struct 'A' used as base for dll-interface class 'B' + +struct __declspec(dllexport) ExportedArray : array {}; +struct __declspec(dllexport) ExportedArrayZero : array {}; +struct __declspec(dllexport) ExportedDeque : deque {}; +struct __declspec(dllexport) ExportedForwardList : forward_list {}; +struct __declspec(dllexport) ExportedList : list {}; +struct __declspec(dllexport) ExportedVector : vector {}; +struct __declspec(dllexport) ExportedVectorBool : vector {}; + +struct __declspec(dllexport) ExportedMap : map {}; +struct __declspec(dllexport) ExportedMultimap : multimap {}; +struct __declspec(dllexport) ExportedSet : set {}; +struct __declspec(dllexport) ExportedMultiset : multiset {}; + +struct __declspec(dllexport) ExportedUnorderedMap : unordered_map {}; +struct __declspec(dllexport) ExportedUnorderedMultimap : unordered_multimap {}; +struct __declspec(dllexport) ExportedUnorderedSet : unordered_set {}; +struct __declspec(dllexport) ExportedUnorderedMultiset : unordered_multiset {}; + +struct __declspec(dllexport) ExportedQueue : queue {}; +struct __declspec(dllexport) ExportedPriorityQueue : priority_queue {}; +struct __declspec(dllexport) ExportedStack : stack {}; + +#if _HAS_CXX20 +struct __declspec(dllexport) ExportedSpan : span {}; +struct __declspec(dllexport) ExportedSpanThree : span {}; +#endif // _HAS_CXX20