зеркало из https://github.com/microsoft/STL.git
Cleanups: Split type and object definitions (#3526)
This commit is contained in:
Родитель
7f799dca88
Коммит
1c60dc46b6
|
@ -2319,7 +2319,8 @@ public:
|
|||
value_type _Buf[_BUF_SIZE];
|
||||
pointer _Ptr;
|
||||
char _Alias[_BUF_SIZE]; // TRANSITION, ABI: _Alias is preserved for binary compatibility (especially /clr)
|
||||
} _Bx;
|
||||
};
|
||||
_Bxty _Bx;
|
||||
|
||||
size_type _Mysize = 0; // current length of string
|
||||
size_type _Myres = 0; // current storage reserved for string
|
||||
|
|
|
@ -131,7 +131,8 @@ namespace Concurrency {
|
|||
this);
|
||||
return m_isSupported;
|
||||
}
|
||||
} asyncCausalityTracer;
|
||||
};
|
||||
AsyncCausalityTracer asyncCausalityTracer;
|
||||
|
||||
// GUID used for identifying causality logs from PPLTask
|
||||
const GUID PPLTaskCausalityPlatformID = {
|
||||
|
|
|
@ -113,7 +113,8 @@ namespace Concurrency {
|
|||
_STD unique_lock<_STD mutex> _Lck(_Task_cv_mutex);
|
||||
_Task_cv.wait(_Lck, [] { return _Outstanding_tasks == 0; });
|
||||
}
|
||||
} _Task_scheduler_main_block_instance;
|
||||
};
|
||||
_Task_scheduler_main_block _Task_scheduler_main_block_instance;
|
||||
#endif // CRTDLL2
|
||||
|
||||
void CALLBACK _Task_scheduler_callback(PTP_CALLBACK_INSTANCE _Pci, PVOID _Args, PTP_WORK) noexcept {
|
||||
|
|
|
@ -351,7 +351,9 @@ struct use_async_in_a_global_tester {
|
|||
~use_async_in_a_global_tester() {
|
||||
(void) async([] { return 1729; }).get();
|
||||
}
|
||||
} use_async_in_a_global_instance;
|
||||
};
|
||||
|
||||
use_async_in_a_global_tester use_async_in_a_global_instance;
|
||||
#endif // _M_CEE
|
||||
|
||||
int main() {
|
||||
|
|
|
@ -45,7 +45,8 @@ void test_ops() {
|
|||
|
||||
struct alignas(std::atomic_ref<ValueType>::required_alignment) Padded {
|
||||
ValueType vals[unique] = {};
|
||||
} padded;
|
||||
};
|
||||
Padded padded;
|
||||
|
||||
auto& vals = padded.vals;
|
||||
|
||||
|
|
|
@ -265,7 +265,8 @@ struct erase_fixture {
|
|||
~liveness_empty_asserter() {
|
||||
assert(liveness_alive_objects == 0);
|
||||
}
|
||||
} instance_empty; // destroyed after theList
|
||||
};
|
||||
liveness_empty_asserter instance_empty; // destroyed after theList
|
||||
|
||||
list<int, liveness_allocator<int>> theList;
|
||||
|
||||
|
@ -278,7 +279,8 @@ struct erase_fixture {
|
|||
// tests that the whole container is iterable
|
||||
assert(is_sorted(theList.begin(), theList.end()));
|
||||
}
|
||||
} instance_nonempty; // destroyed before theList
|
||||
};
|
||||
post_asserter instance_nonempty; // destroyed before theList
|
||||
|
||||
void assert_iterators_consistent(const vector<list<int>::const_iterator>& iterators) {
|
||||
assert(theList.size() == iterators.size() - 1);
|
||||
|
|
|
@ -57,7 +57,8 @@ struct erase_fixture {
|
|||
~liveness_empty_asserter() {
|
||||
assert(liveness_alive_objects == 0);
|
||||
}
|
||||
} instance_empty; // destroyed after theHash
|
||||
};
|
||||
liveness_empty_asserter instance_empty; // destroyed after theHash
|
||||
|
||||
using container = unordered_set<int, hash<int>, equal_to<>, liveness_allocator<int>>;
|
||||
using iterator = container::iterator;
|
||||
|
@ -72,7 +73,8 @@ struct erase_fixture {
|
|||
== (_ITERATOR_DEBUG_LEVEL != 0) * 2 + 1 + theHash.size() + theHash.bucket_count() * 2);
|
||||
theHash._Stl_internal_check_container_invariants();
|
||||
}
|
||||
} instance_nonempty; // destroyed before theHash
|
||||
};
|
||||
post_asserter instance_nonempty; // destroyed before theHash
|
||||
|
||||
void assert_iterators_consistent(const vector<iterator>& iterators) {
|
||||
assert(theHash.size() == iterators.size() - 1);
|
||||
|
@ -293,7 +295,8 @@ struct erase_bucket_consistency_fixture {
|
|||
~liveness_empty_asserter() {
|
||||
assert(liveness_alive_objects == 0);
|
||||
}
|
||||
} instance_empty; // destroyed after theHash
|
||||
};
|
||||
liveness_empty_asserter instance_empty; // destroyed after theHash
|
||||
|
||||
using container = unordered_set<elem, hash<elem>, equal_to<>, liveness_allocator<elem>>;
|
||||
container theHash;
|
||||
|
@ -308,7 +311,8 @@ struct erase_bucket_consistency_fixture {
|
|||
assert(distance(theHash.begin(), theHash.end()) == static_cast<ptrdiff_t>(theHash.size()));
|
||||
theHash._Stl_internal_check_container_invariants();
|
||||
}
|
||||
} instance_nonempty; // destroyed before theHash
|
||||
};
|
||||
post_asserter instance_nonempty; // destroyed before theHash
|
||||
|
||||
size_t zeroBucket;
|
||||
size_t midBucket;
|
||||
|
|
Загрузка…
Ссылка в новой задаче