Why doesn't this class deduce its template arguments?
template <class T>
struct Ohlc
{
T o;
T h;
T l;
T c;
};
template <class T, template <class> class Coll>
class OhlcCollector
{
private:
using Container = Coll<Ohlc<T>>;
public:
OhlcCollector(Container & container)
{
}
};
int main()
{
std::vector<Ohlc<double>> v;
// error C2641: cannot deduce template arguments for 'OhlcCollector'
OhlcCollector collector(v);
//but this comples
OhlcCollector<double, std::vector> collector(v);
}
What is the rule applied here?
What kind of arguments are deduced and what are not?