Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$
prog.cc:11:16: error: no viable conversion from returned value of type 'tuple<int, int>' to function return type 'tuple<int &, int &>'
return fetch_values<T...>();
^~~~~~~~~~~~~~~~~~~~
prog.cc:20:21: note: in instantiation of function template specialization 'temporary::operator tuple<int, int>' requested here
std::tie(a,b) = temporary();
^
/opt/wandbox/clang-head/include/c++/v1/tuple:620:5: note: candidate constructor not viable: no known conversion from 'std::__1::tuple<int, int>' to 'const std::__1::tuple<int &, int &> &' for 1st argument
tuple(tuple const&) = default;
^
/opt/wandbox/clang-head/include/c++/v1/tuple:621:5: note: candidate constructor not viable: no known conversion from 'std::__1::tuple<int, int>' to 'std::__1::tuple<int &, int &> &&' for 1st argument
tuple(tuple&&) = default;
^
/opt/wandbox/clang-head/include/c++/v1/tuple:728:9: note: candidate template ignored: requirement '_CheckArgsConstructor<sizeof...(_Up) == sizeof...(_Tp) && !false>::template __enable_implicit<std::__1::tuple<int, int> >() || _CheckArgsConstructor<_EnableImplicitReducedArityExtension && sizeof...(_Up) < sizeof...(_Tp) && !false>::template __enable_implicit<std::__1::tuple<int, int> >()' was not satisfied [with _Up = <std::__1::tuple<int, int>>, _PackIsTuple = false]
tuple(_Up&&... __u)
^
/opt/wandbox/clang-head/include/c++/v1/tuple:827:9: note: candidate template ignored: requirement '_CheckTupleLikeConstructor<__tuple_like_with_size<tuple<int, int>, sizeof...(_Tp)>::value && !_PackExpandsToThisTuple<tuple<int, int> >::value>::template __enable_implicit<std::__1::tuple<int, int> >()' was not satisfied [with _Tuple = std::__1::tuple<int, int>]
tuple(_Tuple&& __t) _NOEXCEPT_((is_nothrow_constructible<_BaseT, _Tuple>::value))
^
1 error generated.
Exit Code:
1