Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: mgjones@vegauk.co.uk (Martin G. Jones)
Subject: Template instantation problem with STL and DEC CXX V5.5
Date: 1997/10/13	[thread overview]
Message-ID: <344246f9.27197351@news.vegauk.co.uk> (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



                 reply	other threads:[~1997-10-13  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

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