https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70845
Bug ID: 70845 Summary: inherited piecewise_construct_t constructor from std::pair by "using-declarations" is missing Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: tuwwcn at gmail dot com Target Milestone: --- This code is PASSED by gcc 5.3.0, but REJECTED by 6.1.0.(all using --std=c++14) --------------------------- code is like this: struct Test : public std::pair<int, std::string> { using std::pair<int, std::string>::pair; }; Test p(std::piecewise_construct, std::forward_as_tuple(1), std::forward_as_tuple("abcd")); --------------------------- Error messages produced by gcc 6.1.0 is: error: use of deleted function ‘constexpr std::tuple< <template-parameter-1-1> >::tuple(const std::tuple< <template-parameter-1-1> >&) [with _Elements = {int&&}]’ using std::pair<int, std::string>::pair; gcc-6.1.0/include/c++/6.1.0/tuple:633:17: note: ‘constexpr std::tuple< <template-parameter-1-1> >::tuple(const std::tuple< <template-parameter-1-1> >&) [with _Elements = {int&&}]’ is implicitly deleted because the default definition would be ill-formed: constexpr tuple(const tuple&) = default; ^~~~~ gcc-6.1.0/include/c++/6.1.0/tuple:633:17: error: use of deleted function ‘constexpr std::_Tuple_impl<_Idx, _Head>::_Tuple_impl(const std::_Tuple_impl<_Idx, _Head>&) [with long unsigned int _Idx = 0ul; _Head = int&&]’ gcc-6.1.0/include/c++/6.1.0/tuple:363:17: note: ‘constexpr std::_Tuple_impl<_Idx, _Head>::_Tuple_impl(const std::_Tuple_impl<_Idx, _Head>&) [with long unsigned int _Idx = 0ul; _Head = int&&]’ is implicitly deleted because the default definition would be ill-formed: constexpr _Tuple_impl(const _Tuple_impl&) = default; ^~~~~~~~~~~ gcc-6.1.0/include/c++/6.1.0/tuple:363:17: error: use of deleted function ‘constexpr std::_Head_base<_Idx, _Head, false>::_Head_base(const std::_Head_base<_Idx, _Head, false>&) [with long unsigned int _Idx = 0ul; _Head = int&&]’ gcc-6.1.0/include/c++/6.1.0/tuple:110:17: note: ‘constexpr std::_Head_base<_Idx, _Head, false>::_Head_base(const std::_Head_base<_Idx, _Head, false>&) [with long unsigned int _Idx = 0ul; _Head = int&&]’ is implicitly deleted because the default definition would be ill-formed: constexpr _Head_base(const _Head_base&) = default; ^~~~~~~~~~ gcc-6.1.0/include/c++/6.1.0/tuple:110:17: error: copying non-static data member ‘int&& std::_Head_base<0ul, int&&, false>::_M_head_impl’ of rvalue reference type