Fix incorrectly qualified return type from unique_ptr::get_deleter().

For reference deleter types the const qualifier on the return type
of get_deleter() should be ignored, and a non-const deleter should
be returned.

This patch fixes a bug where "const deleter_type&" is incorrectly
formed.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300121 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2017-04-12 22:43:49 +00:00
parent 6d5fdc110f
commit 39683f1377
4 changed files with 73 additions and 31 deletions

View File

@@ -184,7 +184,7 @@ struct is_same<T, T> { enum {value = 1}; };
} // namespace test_macros_detail
#define ASSERT_SAME_TYPE(...) \
static_assert(test_macros_detail::is_same<__VA_ARGS__>::value, \
static_assert((test_macros_detail::is_same<__VA_ARGS__>::value), \
"Types differ uexpectedly")
#ifndef TEST_HAS_NO_EXCEPTIONS