Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Template instantation problem with STL and DEC CXX V5.5
@ 1997-10-13  4:00 Martin G. Jones
  0 siblings, 0 replies; only message in thread
From: Martin G. Jones @ 1997-10-13  4:00 UTC (permalink / raw)



Consider this noddy piece of STL usage:

// ** find_if.cxx
#include <vector>
#include <algorithm>

class equalto1 {
public:
        int operator()(int x) {
                return x == 1;
        }
};

void main(...) {
        vector<int> x;
        find_if(x.begin(), x.end(), equalto1());
}
// **

And compile it with a normal cxx command (i.e. use repository) 
'cxx find_if.cxx'

You get the following errors (this is from the template resolution
phase during link, the object file is successfully created during
compile):

cxx: Error: ./cxx_repository/find_if__XPiPi8equalto1.cxx, line 2:
Ill-formed parameter type list.
void static __dummy_ (int *p1, int *p2, equalto1 p3)
----------------------------------------^
ld:
Unresolved:
find_if(int*, int*, equalto1)

---

Is this a problem with the command arguments to cxx, or a problem with
cxx's repository management.

Suggested solutions would be appreciated,

Thanks in advance,

	Martin.

************
Martin G. Jones, Software Engineer
email: mgjones@vegauk.co.uk



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-10-13  4:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-13  4:00 Template instantation problem with STL and DEC CXX V5.5 Martin G. Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox