prog.cpp: In function ‘int main()’:
prog.cpp:20:27: error: no matching function for call to ‘forwarder(std::remove_reference<int&>::type)’
forwarder(std::move(y));
^
prog.cpp:20:27: note: candidate is:
prog.cpp:8:1: note: template<class T> typename std::enable_if<std::is_const<typename std::remove_reference< <template-parameter-1-1> >::type>::value>::type forwarder(T&&)
forwarder(T&& x)
^
prog.cpp:8:1: note: template argument deduction/substitution failed:
prog.cpp: In substitution of ‘template<class T> typename std::enable_if<std::is_const<typename std::remove_reference< <template-parameter-1-1> >::type>::value>::type forwarder(T&&) [with T = int]’:
prog.cpp:20:27: required from here
prog.cpp:8:1: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’
prog.cpp:21:16: error: no matching function for call to ‘forwarder(int&)’
forwarder(y);
^
prog.cpp:21:16: note: candidate is:
prog.cpp:8:1: note: template<class T> typename std::enable_if<std::is_const<typename std::remove_reference< <template-parameter-1-1> >::type>::value>::type forwarder(T&&)
forwarder(T&& x)
^
prog.cpp:8:1: note: template argument deduction/substitution failed:
prog.cpp: In substitution of ‘template<class T> typename std::enable_if<std::is_const<typename std::remove_reference< <template-parameter-1-1> >::type>::value>::type forwarder(T&&) [with T = int&]’:
prog.cpp:21:16: required from here
prog.cpp:8:1: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’