mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
LWG 2969 "polymorphic_allocator::construct() shouldn't pass resource()"
Patch from Arthur O'Dwyer. In the TS, `uses_allocator` construction for `pair` tried to use an allocator type of `memory_resource*`, which is incorrect because `memory_resource*` is not an allocator type. LWG 2969 fixed it to use `polymorphic_allocator` as the allocator type instead. https://wg21.link/lwg2969 (D47090 included this in `<memory_resource>`; at Eric's request, I've split this out into its own patch applied to the existing `<experimental/memory_resource>` instead.) Reviewed as https://reviews.llvm.org/D47109 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@333384 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
// because it can't include <experimental/memory_resource>
|
||||
template <>
|
||||
struct TransformErasedTypeAlloc<std::experimental::erased_type> {
|
||||
using type = std::experimental::pmr::memory_resource*;
|
||||
using type = std::experimental::pmr::polymorphic_allocator<int>;
|
||||
};
|
||||
|
||||
template <class ProviderT, int = 0>
|
||||
|
Reference in New Issue
Block a user