Sorting a <shared_ptr<CustomParticle>> in Box2D

I’m trying to sort a shared pointer of Box2D circles and I get the following error.

I declare the shared_ptr like this

vector <shared_ptr<CustomParticle> > circles;

This is the sorting function in the .cpp file.

bool sortMe(const shared_ptr<CustomParticle> &a, const shared_ptr<CustomParticle> &b){
    
    ofVec2f tempA = a.getPosition();
    ofVec2f tempB = b.getPosition();
    if (tempA.y < tempB.y ){
        return true;
    } else {
        return false;
    }
}

This is where I try to sort in the cpp file.

ofSort(circles,sortMe);

And this is the code for the CustomParticle Class

class Data {
public:
    int id;
    int age;
    int wordCount;
    int currentWord;
    int currentLetter;
    string particleTweet;
    vector< string > tweetWords; // used to cycle words per tweet
    int counter;
    int group;
    int lifetime;
    
    //ofImage    *    texturePtr;
    
};

class CustomParticle: public ofxBox2dCircle{
public:
    void setupTheCustomData(string tempTweet,int tempGroup) {
        
        setData(new Data());
        Data *theData = (Data*)getData();
        
        theData->id = ofRandom(0, 100);
        theData->age = 0;
        theData->particleTweet = tempTweet;
        theData->tweetWords = ofSplitString(theData->particleTweet," ",TRUE);
        theData->wordCount = theData->tweetWords.size();
        theData->currentWord = 0;
        theData->group = tempGroup;
        theData->lifetime = tempTweet.size();
    }
    
    void update(){
        Data* theData = (Data*)getData();
        if(theData) {
            theData->age = theData->age + 1;
            
            
        }
        
    }
    
    int getGroup(){
        Data* theData = (Data*)getData();
        int tempGroup;
        tempGroup = theData->group;
        return tempGroup;
        
    }
    
    string getTweet(){
        Data* theData = (Data*)getData();
        string tempTweet;
        tempTweet = theData->particleTweet;
        return tempTweet;
    }
    
    
    void incrementCurrentWord(){
        Data* theData = (Data*)getData();
        int tempWord;
        tempWord = theData->currentWord;
        tempWord++;
        tempWord = tempWord%theData->tweetWords.size();
        theData->currentWord = tempWord;
        
    }
    
    void incrementLetter(){
        Data* theData = (Data*)getData();
        int tempLetter;
        tempLetter = theData->currentLetter;
        tempLetter++;
        tempLetter = tempLetter%theData->particleTweet.size();
        theData->currentLetter = tempLetter;
        
    }
    
    string getLetter(){
        Data* theData = (Data*)getData();
        string tempLetter;
        tempLetter = theData->particleTweet[theData->currentLetter];
        return tempLetter;
    }
    
    string getWord(){
        Data* theData = (Data*)getData();
        string tempWord;
        tempWord = theData->tweetWords[theData->currentWord];
        return tempWord;
        
    }
    /*
    void setTexture(ofImage * texture) {
        Data* theData = (Data*)getData();
        if(theData) {
            theData->texturePtr = texture;
            theData->texturePtr->getTextureReference().setTextureMinMagFilter(GL_NEAREST, GL_NEAREST);
            theData->texturePtr->getTextureReference().setTextureWrap(GL_REPEAT, GL_REPEAT);
            }
    }
     */
    
    int getAge(){
        Data* theData = (Data*)getData();
        if(theData){
            
            return theData->age;;
        }
    }
    
    int getlifeTime(){
        Data* theData = (Data*)getData();
        if(theData){
            
            return theData->lifetime;;
        }
    }
    };

Any help at all would be greatly appreciated. Thanks in advance.
Casey