<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - can't compile tuple<unique_ptr<char []>>foo;"
href="http://llvm.org/bugs/show_bug.cgi?id=18350">18350</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>can't compile tuple<unique_ptr<char []>>foo;
</td>
</tr>
<tr>
<th>Product</th>
<td>libc++
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>hhinnant@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>cfy1990@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>$ cat tuple.cc
#include <tuple>
#include <memory>
int main(void){
using namespace std;
tuple<unique_ptr<char []>> b;
}
$ clang++ -std=c++11 -Wall -Wextra -stdlib=libc++ -O2
tuple.cc -o tuple.out
In file included from tuple.cc:2:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:918:22:
error: implicit instantiation of undefined template
'std::__1::__pointer_traits_element_type<std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [], std::__1::default_delete<char []> >, false>,
false>'
typedef typename __pointer_traits_element_type<pointer>::type
element_type;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2451:54:
note: in instantiation of template class
'std::__1::pointer_traits<std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [], std::__1::default_delete<char []> >, false> >'
requested here
bool = is_same<typename remove_cv<typename
pointer_traits<_Ptr1>::element_type>::type,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2465:7:
note: in instantiation of default argument for
'__same_or_less_cv_qualified_imp<std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [], std::__1::default_delete<char []> >, false>, char
*>' required here
: __same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {};
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2732:42:
note: in instantiation of template class
'std::__1::__same_or_less_cv_qualified<std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [], std::__1::default_delete<char []> >, false>, char
*, false>' requested here
class = typename enable_if<__same_or_less_cv_qualified<_Pp,
pointer>::value>::type
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2734:40:
note: in instantiation of default argument for
'unique_ptr<std::__1::__tuple_leaf<0, std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, false> >' required here
_LIBCPP_INLINE_VISIBILITY explicit unique_ptr(_Pp __p) _NOEXCEPT
^~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:2734:40:
note: while substituting deduced template arguments into function
template 'unique_ptr' [with _Pp = std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [], std::__1::default_delete<char []> >, false>, $1 =
<no value>]
_LIBCPP_INLINE_VISIBILITY explicit unique_ptr(_Pp __p) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1829:1:
note: (skipping 1 context in backtrace; use
-ftemplate-backtrace-limit=0 to see all)
__is_constructible_test(_Tp&&, _Args&& ...);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1888:14:
note: in instantiation of template class
'std::__1::__is_constructible<false, std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, const std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, false> &>' requested here
: public __is_constructible<is_scalar<_Tp>::value ||
is_reference<_Tp>::value,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/type_traits:1914:14:
note: in instantiation of template class
'std::__1::__is_constructible_void_check<false, std::__1::unique_ptr<char
[], std::__1::default_delete<char []> >, const std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, false> &>' requested here
: public __is_constructible_void_check<__contains_void<_Tp,
_Args...>::value
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:260:42:
note: in instantiation of template class
'std::__1::is_constructible<std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, const std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, false> &>' requested here
class = typename enable_if<is_constructible<_Hp,
_Tp>::value>::type>
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:262:18:
note: in instantiation of default argument for '__tuple_leaf<const
std::__1::__tuple_leaf<0, std::__1::unique_ptr<char [],
std::__1::default_delete<char []> >, false> &>' required here
explicit __tuple_leaf(_Tp&& __t)
_NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
^~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/tuple:262:18:
note: while substituting deduced template arguments into function
template '__tuple_leaf' [with _Tp = const std::__1::__tuple_leaf<0,
std::__1::unique_ptr<char [], std::__1::default_delete<char []> >, false> &, $1
= <no value>]
explicit __tuple_leaf(_Tp&& __t)
_NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:704:8:
note: template is declared here
struct __pointer_traits_element_type;
^
1 error generated.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>