Reputation: 6305
I'm pretty new to template metaprogramming and can't find my thinking error in this approach:
template <typename T>
typename T::ReturnType Query(const std::string& Str);
template <>
ResultTypeRowCount Query(const std::string& Str) { return this->queryRowCount(Str); }
ResultTypeRowCount implements a public typedef with the name ReturnType
Thankyou for reading
Upvotes: 0
Views: 122
Reputation: 10720
Specializing your template should follow this pattern:
template<typename T>
void foo() {
}
template<>
void foo<int>() {
}
Upvotes: 1
Reputation: 110069
It should be:
template <>
ResultTypeRowCount::ReturnType Query<ResultTypeRowCount>(const std::string& Str) { return this->queryRowCount(Str); }
Upvotes: 2