This is the same as<div><br><a href="http://llvm.org/bugs/show_bug.cgi?id=17798">http://llvm.org/bugs/show_bug.cgi?id=17798</a></div><div>No?<span></span><br>On Wednesday, November 6, 2013, İsmail Dönmez  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,<div><br></div><div>Testcase stolen from #llvm channel, using clang r194134 on Linux x86-64.</div><div>This is also reported as <a href="http://llvm.org/bugs/show_bug.cgi?id=17826" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=17826</a></div>


<div><br></div><div><div>[/havana/t/clang]> cat test.cpp </div><div>#include <memory></div><div>using namespace std;</div><div> </div><div>class test {</div><div>        struct private_tag {};</div><div>public:</div>


<div>        test(private_tag) {}</div><div>        static shared_ptr<test> make_test() {</div><div>                return make_shared<test>(private_tag());</div><div>        }</div><div>};</div><div> </div><div>


int main()</div><div>{</div><div>        auto t = test::make_test();</div><div>}</div></div><div><br></div><div><br></div><div><div>[/havana/t/clang]> clang++ -std=c++11 -stdlib=libc++  test.cpp</div><div>In file included from test.cpp:1:</div>


<div>In file included from /usr/include/c++/v1/memory:603:</div><div>/usr/include/c++/v1/tuple:267:11: error: rvalue reference to type 'test::private_tag' cannot bind to lvalue of type</div><div>      'test::private_tag'</div>


<div>        : value(__t.get())</div><div>          ^     ~~~~~~~~~</div><div>/usr/include/c++/v1/tuple:385:8: note: in instantiation of member function 'std::__1::__tuple_leaf<0, test::private_tag &&,</div>


<div>      false>::__tuple_leaf' requested here</div><div>struct __tuple_impl<__tuple_indices<_Indx...>, _Tp...></div><div>       ^</div><div>/usr/include/c++/v1/memory:4290:26: note: in instantiation of function template specialization</div>


<div>      'std::__1::__shared_ptr_emplace<test, std::__1::allocator<test> >::__shared_ptr_emplace<test::private_tag>' requested</div><div>      here</div><div>    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);</div>


<div>                         ^</div><div>/usr/include/c++/v1/memory:4649:29: note: in instantiation of function template specialization</div><div>      'std::__1::shared_ptr<test>::make_shared<test::private_tag>' requested here</div>


<div>    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);</div><div>                            ^</div><div>test.cpp:9:24: note: in instantiation of function template specialization 'std::__1::make_shared<test, test::private_tag>'</div>


<div>      requested here</div><div>                return make_shared<test>(private_tag());</div><div>                       ^</div><div>In file included from test.cpp:1:</div><div>In file included from /usr/include/c++/v1/memory:603:</div>


<div>/usr/include/c++/v1/tuple:268:10: error: static_assert failed "Can not copy a tuple with rvalue reference member"</div><div>        {static_assert(!is_rvalue_reference<_Hp>::value, "Can not copy a tuple with rvalue reference member");}</div>


<div>         ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</div><div>2 errors generated.</div></div><div><br></div></div>
</blockquote></div>