On Wed, Feb 15, 2012 at 10:56 AM, Paul Hargrove <phhargr...@lbl.gov> wrote: > I strongly suspect that this is a Clang++ bug.
I don't know if it is a Clang bug, but here's my understanding of the problem. TokenFactoryScopeC<T>::create() boils down to this: template <class T> uint32_t TokenFactoryScopeC<T>::create( const void * localDef, uint32_t globalToken ) { const T & local_def = *static_cast<const T*>(localDef); typename std::set<T>::const_iterator it = m_globDefs->find( local_def ); // need operator< for T return 0; } When clang tries to instantiate TokenFactoryScopeC<DefRec_BaseS>::getPackSize(), it tries to instantiate create() too. It fails to do so because there is no operator< defined for DefRec_BaseS. Anyway, this looks like a bug in VT code, here's why. DefRec_* have DefRec_*::SortS defined, but it is not used in TokenFactoryScopeC<T>::m_globDefs. Probably it should be, something like this: std::set<T, typename T::SortS> * m_globDefs; I'm not sure if this is a bug in Clang because I don't know if Clang should have tried to instantiate create(). Dmitri -- main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if (j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/