次のように宣言されたテンプレートクラスのメンバー関数があります。
template <class T>
int Data<T>::getPosition(vector<T> stuff, T newStuff, bool ascending)
私はこれを行のどこかで呼び出します
frequencies.insert(frequencies.begin() + getPosition(frequencies, current, ascending),
frequencies[i]);
その行の変数は次のように宣言されます。
vector<T> temp;
vector<int> frequencies;
int current = frequency.find(words[i])->second;
ただし、 を呼び出すと、次のgetPositionエラーが発生します。
Data.h|158|error: no matching function for call to 'primitives::Data<double>::getPosition(std::vector<int, std::allocator<int> >&, int&, bool&)'|
Data.h|165|note: candidates are: int primitives::Data<T>::getPosition(std::vector<T, std::allocator<_CharT> >, T, bool) [with T = double]|
ここで何が間違っていますか?