problem with stable_partiion on 64 bit

We have some code that builds on 32 bit mode but on 64 bit mode gives an error that does not seem to be related to anything about 32 vs. 64 migration.

We are on Solaris 8, Sparc. The compiler is Sun Studio 11.

version of "/s11/SUNWspro/bin/CC": Sun C++ 5.8 Patch 121017-02 2006/04/19

version of "libCstd.so.1": Sun SUNWlibC SunOS 5.8 Patch 108434-21 2005/11/18

The code looks like this

............

vector<myClass*> pids;

vector<myClass*>::iterator pidIter;

pidIter = stable_partition (pids.begin(), pids.end(), in_set());

.........................

And this is the error:

/s11/SUNWspro/prod/include/CC/Cstd/./algorithm", line 628: Error: Could not find a match for std::__stable_partition<std::BidirectionalIterator, std::Predicate, std::Pointer, std::Distance>(std::list<myClass*>::iterator, std::list<myClass*>::iterator, in_set, int, std::pair<myClass**, long>) needed in std::__stable_partition_aux<std::list><myClass*>::iterator, in_set, int>(std::list<myClass*>::iterator, std::list<myClass*>::iterator, in_set, int*).

1 Error(s) and 2 Warning(s) detected.

Is this related to any known issue with the compiler?

Thanks.

[1278 byte] By [Guru_Chandar] at [2007-11-26 9:53:17]
# 1

I don't see anything in the code you show that would be affected by 32-bit vs 64-bit compilation.

I fleshed out your three lines enough to get a compilable example:

#include <vector>

#include <algorithm>

struct myClass { };

struct in_set {

bool operator()(const myClass*) { return true; }

};

int main()

{

std::vector<myClass*> pids;

std::vector<myClass*>::iterator pidIter;

pidIter = std::stable_partition (pids.begin(), pids.end(), in_set());

}

This code compiles and links in both 32-bit and 64-bit mode.

Can you provide an example that does not work?

clamage45 at 2007-7-7 1:09:46 > top of Java-index,Development Tools,Solaris and Linux Development Tools...