mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 04:56:06 +00:00
Fix improperly failing test - and the code it was testing. Thanks to Stephan Lavavej for the catch.
llvm-svn: 328225
This commit is contained in:
parent
1193c370b4
commit
a4122be549
@ -1071,19 +1071,17 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
|
||||
return __os << __p.get();
|
||||
}
|
||||
|
||||
#ifndef _LIBCPP_HAS_NO_DECLTYPE
|
||||
template<class _CharT, class _Traits, class _Yp, class _Dp>
|
||||
inline _LIBCPP_INLINE_VISIBILITY
|
||||
typename enable_if
|
||||
<
|
||||
is_same<void, typename __void_t<decltype(declval<basic_ostream<_CharT, _Traits>&>() << declval<_Yp>())>::type>::value,
|
||||
is_same<void, typename __void_t<decltype((declval<basic_ostream<_CharT, _Traits>&>() << declval<typename unique_ptr<_Yp, _Dp>::pointer>()))>::type>::value,
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
>::type
|
||||
operator<<(basic_ostream<_CharT, _Traits>& __os, unique_ptr<_Yp, _Dp> const& __p)
|
||||
{
|
||||
return __os << __p.get();
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class _CharT, class _Traits, size_t _Size>
|
||||
basic_ostream<_CharT, _Traits>&
|
||||
|
@ -24,11 +24,12 @@
|
||||
#include <sstream>
|
||||
#include <cassert>
|
||||
|
||||
class A {};
|
||||
#include "min_allocator.h"
|
||||
#include "deleter_types.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
std::unique_ptr<A> p(new A);
|
||||
std::unique_ptr<int, PointerDeleter<int>> p;
|
||||
std::ostringstream os;
|
||||
os << p;
|
||||
os << p; // expected-error {{invalid operands to binary expression}}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user