From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,3b76b1b6ce73e599,start X-Google-Attributes: gidfee84,public X-Google-Thread: 109fba,3b76b1b6ce73e599,start X-Google-Attributes: gid109fba,public From: tmadsen@crow.netman.dk (Tonny Madsen) Subject: Anybody using STL with DEC C++? Date: 1995/10/31 Message-ID: #1/1 X-Deja-AN: 118376823 sender: tmadsen@crow.netman.dk followup-to: poster organization: NetMan, Copenhagen, Denmark reply-to: tmadsen@netman.dk newsgroups: comp.lang.c++,comp.unix.osf.osf1,comp.unix.osf.osf1 Hi' I have a problem compiling the STL library (standard template library) with DEC C++. My configuration is: Alpha server (several different types actual) Digital UNIX v3.2a DEC C++ (no version but setld identification CXXBASEA132) STL distribution from HP (ftp://butler.hpl.hp.com/stl). The problem seems to be that the compiler doesn't handle classes used as template arguments correctly inside templates. A template argument "" is legal as aType in the template, but as aType::subclass. One example from STL is the definition of the class unary_negate in .../function.h (approx line 130). The following example illustrates the problem. class a { public: typedef int arg; // First typedef }; class b { public: typedef char *arg; // No error here, so // the first typedef // wasn't global. }; a i; a::arg aa(4); // Uses correct definition b::arg bb("hej med dig"); // of arg a::arg func1(int argument); // Legal for function result void func2(a::arg argument); // and arguments too template void func3(aType arg1); // Normalt template, aType // considered alegal type. template aType func4(a::arg arg2); // Yet a normalt template template void func5(aType::arg argument); // Upps error: Missing ")". // aType::arg not considered // a legal type template class c { public: aType arg; // OK, aType is a legal type }; template class d { public: aType::arg arg; // Upps error: Invalid declaration. }; -- tonny ---- Tonny Madsen, NetMan a/s, Vandtaarnsvej 77, DK-2860 Soeborg, Denmark E-mail: Tonny.Madsen@netman.dk Telephone: +45 39 66 40 20 Fax: +45 39 66 06 75