Trying to typedef my memory alignment I came out with the following construct (which still is a bit of work in progress because I need to correct the GNU version):
#if defined(__GNUG__)
template <typename T>
struct sfo_type {
typedef T* restrict __attribute__((aligned(32))) aptr32;
};
#elif defined(__INTEL_COMPILER)
template <typename T>
struct sfo_type {
typedef T* restrict __attribute__((aligned(32))) aptr32;
};
#endif
and then I try to use it like this:
template<typename T>
class tsfo_vector {
private:
sfo_type<T>::aptr32 m_data;
int m_size;
...
but then I get the following error message:
/Users/bravegag/code/fastcode_project/code/src/sfo_vector.h(43): error: nontype "sfo_type<T>::aptr32 [with T=T]" is not a type name
sfo_type<T>::aptr32 m_data;
^
Can anyone advice what's wrong here?