prog.cpp: In instantiation of ‘void X(T&&) [with T = std::basic_string<char>&]’:
prog.cpp:13:5: required from here
prog.cpp:7:28: error: no matching function for call to ‘forward(std::basic_string<char>&)’
auto y = std::forward(x);
^
prog.cpp:7:28: note: candidates are:
In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0,
from /usr/include/c++/4.8/utility:70,
from prog.cpp:1:
/usr/include/c++/4.8/bits/move.h:76:5: note: template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&)
forward(typename std::remove_reference<_Tp>::type& __t) noexcept
^
/usr/include/c++/4.8/bits/move.h:76:5: note: template argument deduction/substitution failed:
prog.cpp:7:28: note: couldn't deduce template parameter ‘_Tp’
auto y = std::forward(x);
^
In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0,
from /usr/include/c++/4.8/utility:70,
from prog.cpp:1:
/usr/include/c++/4.8/bits/move.h:87:5: note: template<class _Tp> constexpr _Tp&& std::forward(typename std::remove_reference<_From>::type&&)
forward(typename std::remove_reference<_Tp>::type&& __t) noexcept
^
/usr/include/c++/4.8/bits/move.h:87:5: note: template argument deduction/substitution failed:
prog.cpp:7:28: note: couldn't deduce template parameter ‘_Tp’
auto y = std::forward(x);
^