Following is a reduced test case from parsec suite that compiles with g++ and fails to compile with clang++ 3.4:

template class MATRIX_3X3;

template class DIAGONAL_MATRIX_3X3;

template

class SYMMETRIC_MATRIX_3X3

{

public:

void Fast_Solve_Eigenproblem(DIAGONAL_MATRIX_3X3& eigenvalues,

MATRIX_3X3& eigenvectors) const

{

DIAGONAL_MATRIX_3X3 eigenvalues_double;

MATRIX_3X3 eigenvectors_double;

eigenvalues = eigenvalues_double;

eigenvectors = eigenvectors_double;

}

};

The error messages I receive are:

./matrix.hpp: 11:33: error: implicit instantiation of undefined template ‘DIAGONAL_MATRIX_3X3’

./matrix.hpp: 2:25: note: template is declared here

./matrix.hpp:12:24: error: implicit instantiation of undefined template ‘MATRIX_3X3’

./matrix.hpp:1:25: note: template is declared here

2 errors generated

Is there something I am missing - or a way to modify this code to make it compile with clang++?