[all-commits] [llvm/llvm-project] a00290: [libc++] Fix allocate_shared when used with an exp...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Tue Dec 15 08:50:30 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a00290ed10a6b4e9f6e9be44ceec367562f270c6
https://github.com/llvm/llvm-project/commit/a00290ed10a6b4e9f6e9be44ceec367562f270c6
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2020-12-15 (Tue, 15 Dec 2020)
Changed paths:
M libcxx/include/__memory/utilities.h
A libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/allocate_shared.explicit_conversion.pass.cpp
Log Message:
-----------
[libc++] Fix allocate_shared when used with an explicitly convertible allocator
When the allocator is only explicitly convertible from other specializations
of itself, the new version of std::allocate_shared would not work because
it would try to do an implicit conversion. This patch fixes the problem
and adds a test so that we don't fall into the same trap in the future.
More information about the All-commits
mailing list