[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3597.0. "template" by BARNA::DSMAIL () Tue Jun 03 1997 11:01

  Hi people:

  I have a customer that tries to compile with C++.
  Files are below described.
  Problem is described below.

  Helps are welcome
  
  Thanks in advanced 


*******************************************
file pru.cc
******************************************

#include "pru.hh"

int main()
{
	Asociacion<int, int> a;
}


********************************************
file pru.cxx

********************************************
// -------

template<class T>
Lista<T>::Lista()
{
}

template<class T>
Lista<T>::~Lista()
{
}

// -------

template<class T1, class T2>
Vinculo2<T1, T2>::Vinculo2()
{
}

template<class T1, class T2>
Vinculo2<T1, T2>::~Vinculo2()
{
}

// -------

template<class T1, class T2>
Asociacion<T1, T2>::Asociacion()
{
}

template<class T1, class T2>
Asociacion<T1, T2>::~Asociacion()
{
}


***************************************
file pru.hh 
***************************************

#ifndef _PRU_
#define _PRU_

template<class T>
class Lista
{
	private:
		T _data;

	public:
		Lista();
		~Lista();
};

template<class T1, class T2>
class Vinculo2
{
	private:
		T1 _data1;
		T1 _data2;

	public:
		Vinculo2();
		~Vinculo2();
};

template<class T1, class T2>
class Asociacion
{
	private:

/*
****************	Code gets problem ******************************
*/
		Lista<Vinculo2<T1, T2> *> _data;

/*
*****************        If replaces following sentence ******************	

		Lista<Vinculo2<T1, T2> *> _data;

**************************       by this **********************************	

		Lista<Vinculo2<T1, T2> > _data;

*****************************	no problem *********************************
*/

	public:

		Asociacion();
		~Asociacion();
};

#include "pru.cxx"

#endif



OSF1 dirak V4.0 564 alpha
cxx  (cxx)
DEC C++ V5.5-004 on Digital UNIX (Alpha)

# cxx -o test pru.cc         
cxx: Error: ./cxx_repository/Lista__TP13Vinculo2__Tii.cxx, line 2: In this declaration, "Vinculo2" does not name a type.
typedef Lista<Vinculo2* > __dummy_;
--------------^
ld:
Unresolved:
Lista<Vinculo2<int, int>*>::Lista<Vinculo2<int, int>*>(void)
Lista<Vinculo2<int, int>*>::~Lista<Vinculo2<int, int>*>(void)

    
T.RTitleUserPersonal
Name
DateLines
3597.1It has been fixed in our V5.6DECCXL::KAOTue Jun 03 1997 12:003
Thanks for your report.
I have reproduced your problem with DEC C++ V5.5-004, and comfirmed
that it has been fixed in our V5.6 DEC C++ compiler.
3597.2slow perfomanceBARNA::DSMAILWed Jun 04 1997 04:5716
    
    	Thanks Kao.
    
    	Sorry,I have another question that customer asks me.
        
        Customer says that when uses a compiler gnu ++ in a pc 
        is more fast that in ALPHA system with UNIX.
    
        is there any option of compiler to increase performance?
        or any program to debug?
    
        Thanks in advanced
    
        Francesc
       
    
3597.3Sent us a test case...DECCXL::KAOWed Jun 04 1997 10:357
There are too many elements that have to be considered.
Generally, a pc is a single user environment, it functions differently from
a multi-users environment.
Please sent us a test case with the performance data you have, and we'll 
be glad to look into it and see if there is any thing that we or you can do.

Shi-Jung