I am declaring a template class and defining the methods on an inline file
(foo.hpp)
template<typename T>
class Foo {
public:
using Result = T::Result;
Foo();
~Foo();
Result Bar();
};
(foo-inl.hpp)
template<typename T>
Result Foo<T>::Bar() {
...
}
But I get an error
error: 'Result' does not name a type;
I thought, since i declare Bar
as part of Foo<T>
the method definition should know about Result
Any suggestons on how to fix it?