I have a class template which defines a type inside it:
#include <boost/array.hpp>
template <typename T, int N>
class MyFunct {
public:
typedef boost::array<T,N> FArray;
MyFunct();
};
Now I have another class template. The thing that makes this class particular is that it is supposed to work only with types that define, inside of them, a type called FArray
. Do not ask why please, there is a reason for this.
template <typename F>
class MyClass {
public:
MyClass() {
F::FArray a = F::FArray();
}
};
And I use this:
int main(int argc, char** argv) {
MyClass< MyFunct<double,10> > m;
}
When I have this situation the compiler gets mad telling me that double
has no member called FArray
. What's happening?