I have the following API to be implemented:
tuple<vector<string>, ItemStatus> SomeFcn() const
{
vector<string> result_item;
return tuple(result_item, ItemStatus::ACTUAL );
}
But it does not compile and compile output is not clear at all
/usr/include/c++/9/bits/stl_pair.h:436:9: note: candidate: ‘template<class ... _Args1, long unsigned int ..._Indexes1, class ... _Args2, long unsigned int ..._Indexes2> std::pair<_T1, _T2>::pair(std::tuple<_Args1 ...>&, std::tuple<_Args2 ...>&, std::_Index_tuple<_Indexes1 ...>, std::_Index_tuple<_Indexes2 ...>)’ 436 | pair(tuple<_Args1...>&, tuple<_Args2...>&, | ^~~~ /usr/include/c++/9/bits/stl_pair.h:436:9: note: template argument deduction/substitution failed:
Something is wrong at tuple instance creation. I have this code compiled with -std=c++17
. ItemStatus
is an enum class.
What's wrong here?