I have a boost/C++ error which I am having a difficult time figuring out.

Compiler error : Call to member function '__construct_node' is ambiguous

Where <---------- is marked causes the errors.

I understand there is a constructor issue. But reading the STL map header file causes my eyes to glaze over.

I am not an C++ expert.

Changing int128_t to system defined int64_t removes the error. So it is an issue with int128_t class (or map).

 

Definitions:

using namespace boost::multiprecision;

typedef int128_t StellarObjectID;

struct StellarIDComp {

    bool operator()(const StellarObjectID& ID1,const StellarObjectID& ID2) const {

        return ID1 < ID2;

};

typedef std::map<StellarObjectID,StellarObjectRef,StellarIDComp> StellarObjectMap;

//--------------------------------------------

static StellarObjectMap stellarObjects;

 

int WGRegisterStellarObject(StellarObjectRef obj) {

if (obj==nil) {return EINVAL;}

if (obj->StellarID()==0) {return errInvalidID;}

if (stellarObjects.find(obj->StellarID())!= stellarObjects.end()) {

    return errStellarObjectIDClash;

}

stellarObjects[obj->StellarID()]=obj; <-------------

return 0;

};

 

StellarObjectRef WGGetStellarObject(const StellarObjectID& ID) {

if (ID==0) {return nil;}

if (stellarObjects.find(ID) == stellarObjects.end()) {return nil;}

return stellarObjects[ID]; <---------

};