File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
tests/std/tests/GH_001638_dllexport_derived_classes Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -582,6 +582,7 @@ public:
582
582
}
583
583
584
584
#if _HAS_CXX23
585
+ template <int = 0> // see GH-3013
585
586
constexpr void swap(const tuple& _Right) const
586
587
noexcept(conjunction_v<is_nothrow_swappable<const _This>, is_nothrow_swappable<const _Rest>...>) {
587
588
_Swap_adl(_Myfirst._Val, _Right._Myfirst._Val);
Original file line number Diff line number Diff line change @@ -329,6 +329,7 @@ struct pair { // store a pair of values
329
329
}
330
330
331
331
#if _HAS_CXX23
332
+ template <int = 0> // see GH-3013
332
333
constexpr void swap(const pair& _Right) const
333
334
noexcept(is_nothrow_swappable_v<const _Ty1>&& is_nothrow_swappable_v<const _Ty2>) {
334
335
if (this != _STD addressof(_Right)) {
Original file line number Diff line number Diff line change 9
9
#include < queue>
10
10
#include < set>
11
11
#include < stack>
12
+ #include < tuple>
12
13
#include < unordered_map>
13
14
#include < unordered_set>
15
+ #include < utility>
14
16
#include < vector>
15
17
16
18
#if _HAS_CXX20
@@ -50,3 +52,7 @@ struct __declspec(dllexport) ExportedStack : stack<int> {};
50
52
struct __declspec (dllexport) ExportedSpan : span<int > {};
51
53
struct __declspec (dllexport) ExportedSpanThree : span<int , 3 > {};
52
54
#endif // _HAS_CXX20
55
+
56
+ // Test GH-3013 "<utility>: pair::swap(const pair&) interacts badly with __declspec(dllexport)"
57
+ struct __declspec (dllexport) ExportedPair : pair<int , int > {};
58
+ struct __declspec (dllexport) ExportedTuple : tuple<int , int , int > {};
You can’t perform that action at this time.
0 commit comments