Help with g++?

Roberto Diaz rdiazmartin@vivaldi.dhis.org
Thu Jun 7 14:47:00 GMT 2001


Hi!

I have been searching the lists available at gcc.gnu.org I wonder if this
one is the correct one to send doubts about g++.

I have this problem:

this compile without problems:

template< class T > 
class threadData {
public:
  threadData ();
  ~threadData ();
  T* operator->();
  T &getObject () {return object;}
  pthread_mutex_t getMutex () {return localMutex;}
 private:
  pthread_mutex_t localMutex; // mutex to protect this object
  pthread_cond_t localCond; // local conditional variable
  T object; // our real object 
};

// see function definitions below.

// our exception (thread::run() thread::threaded() ) ----->
template < class T >
class runError {
  friend class thread;
  friend class threadData < T >;
 public:
 ..... etc ....

So I have two friends declared.. the class thread is defined later in the
header file *after* runError.. this is not causing me troubles.. the
problem is that if I try to define the template threadData *after*
runError then g++ complaints and says something like "threadData not a
template"..

sorry if this is not the correct list to ask this questions.. I was
looking for g++-help without success..

Thank you! 

Regards

Roberto

------------------------------------------------------------------------
Roberto Diaz <rdiazmartin@vivaldi.dhis.org>
http://vivaldi.dhis.org
Powered by GNU running on a Linux kernel.
Powered by Debian (The real wonder)

Concerto Grosso Op. 3/8 A minor
Antonio Vivaldi (so... do you need beautiful words?)
------------------------------------------------------------------------



More information about the Gcc-help mailing list