メソッドの実装をクラスから移動したところ、次のエラーが発生しました。
use of class template requires template argument list
テンプレートタイプをまったく必要としないメソッドの場合...(他のメソッドの場合はすべて問題ありません)
クラス
template<class T>
class MutableQueue
{
public:
bool empty() const;
const T& front() const;
void push(const T& element);
T pop();
private:
queue<T> queue;
mutable boost::mutex mutex;
boost::condition condition;
};
間違った実装
template<> //template<class T> also incorrect
bool MutableQueue::empty() const
{
scoped_lock lock(mutex);
return queue.empty();
}