Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 0 deletions stl/inc/xhash
Original file line number Diff line number Diff line change
Expand Up @@ -1841,6 +1841,7 @@ protected:
}
}

template <bool _Multi2 = _Traits::_Multi, enable_if_t<_Multi2, int> = 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());
Expand Down
1 change: 1 addition & 0 deletions tests/std/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ tests\GH_001105_custom_streambuf_throws
tests\GH_001123_random_cast_out_of_range
tests\GH_001411_core_headers
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
Expand Down
4 changes: 4 additions & 0 deletions tests/std/tests/GH_001638_dllexport_derived_classes/env.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

RUNALL_INCLUDE ..\impure_matrix.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

#include <array>
#include <deque>
#include <forward_list>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#if _HAS_CXX20
#include <span>
#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<int, 3> {};
struct __declspec(dllexport) ExportedArrayZero : array<int, 0> {};
struct __declspec(dllexport) ExportedDeque : deque<int> {};
struct __declspec(dllexport) ExportedForwardList : forward_list<int> {};
struct __declspec(dllexport) ExportedList : list<int> {};
struct __declspec(dllexport) ExportedVector : vector<int> {};
struct __declspec(dllexport) ExportedVectorBool : vector<bool> {};

struct __declspec(dllexport) ExportedMap : map<int, int> {};
struct __declspec(dllexport) ExportedMultimap : multimap<int, int> {};
struct __declspec(dllexport) ExportedSet : set<int> {};
struct __declspec(dllexport) ExportedMultiset : multiset<int> {};

struct __declspec(dllexport) ExportedUnorderedMap : unordered_map<int, int> {};
struct __declspec(dllexport) ExportedUnorderedMultimap : unordered_multimap<int, int> {};
struct __declspec(dllexport) ExportedUnorderedSet : unordered_set<int> {};
struct __declspec(dllexport) ExportedUnorderedMultiset : unordered_multiset<int> {};

struct __declspec(dllexport) ExportedQueue : queue<int> {};
struct __declspec(dllexport) ExportedPriorityQueue : priority_queue<int> {};
struct __declspec(dllexport) ExportedStack : stack<int> {};

#if _HAS_CXX20
struct __declspec(dllexport) ExportedSpan : span<int> {};
struct __declspec(dllexport) ExportedSpanThree : span<int, 3> {};
#endif // _HAS_CXX20