Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8262465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:46:04+00:00 2026-06-08T03:46:04+00:00

Not sure if I have a simple typo somewhere, but I’m running into issues

  • 0

Not sure if I have a simple typo somewhere, but I’m running into issues in sorting a deque of tuples.

So, my deque looks like this:

std::deque<boost::tuple<unsigned int, unsigned int> > messages;

And then I have my call to sort:

sort(messages.begin(), messages.end(), msg_sort_criteria);

And my sorting function:

bool msg_sort_criteria(boost::tuple<unsigned int, unsigned int> lhs, boost::tuple<unsigned int, unsigned int> rhs)
{
  return boost::get<1>(lhs) < boost::get<1>(rhs);
}

What happens is that I get errors in stl_heap.h and stl_algo.h.
For instance,

Called object type ‘<bound member function type>‘ is not a function or
function parameter.


Edit:

For clarification, this is all taking place within private members of a class.

class Messages::MessageImpl{
private:
  std::deque<boost::tuple<unsigned int, unsigned int> > messages;

  bool msg_sort_criteria(boost::tuple<unsigned int, unsigned int> lhs, boost::tuple<unsigned int, unsigned int> rhs)
  {
    return boost::get<1>(lhs) < boost::get<1>(rhs);
  }

  void fn()
  {
    sort(msg_queue_.begin(), msg_queue_.end(), msg_sort_criteria);
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T03:46:05+00:00Added an answer on June 8, 2026 at 3:46 am

    Mostly reposting from comment.

    Change your implementation to:

    class Messages::MessageImpl{
    private:
      std::deque<boost::tuple<unsigned int, unsigned int> > messages;
    
      static bool msg_sort_criteria(boost::tuple<unsigned int, unsigned int> lhs,
                                    boost::tuple<unsigned int, unsigned int> rhs)
      {
        return boost::get<1>(lhs) < boost::get<1>(rhs);
      }
    
      void fn()
      {
        sort(msg_queue_.begin(), msg_queue_.end(), &MessageImpl::msg_sort_criteria);
      }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple problem but I am not sure how to solve it.
I have to be missing something simple, but I'm really not sure what. I
I'm not sure of why this is happening, but I have a simple setup
I have a simple task to accomplish, but I am not sure what is
I'm sure there's a simple answer to this... or not: I have a site
I'm not sure why these have to be unique, but from reading the MySQL
Not sure if it's possible but we have 2 servers set up, one automatically
I have a very simple issue, and I'm not sure if it's a bug
I have very simple code and I am not sure why the Foo function
I'm not sure if I can explain this clearly. I have some simple HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.