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 642267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:09:09+00:00 2026-05-13T21:09:09+00:00

The full error I’m getting is this: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1,

  • 0

The full error I’m getting is this:

error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1, A2, A3,     
boost::arg<I> >::a4_ [with A1 = boost::_bi::value<MsgProxy*>, A2 = boost::arg<1>, A3 = 
boost::arg<2>, int I = 3]]’

It references line 116 of a class I have, which is the boost::bind call in this function:

// Dispatch a message onto all connected clients
void MsgProxy::dispatch_msg(t_ic_msg_shptr message) {
    deque<t_socket_shptr>::const_iterator iter = clientList_.begin();

    for(; iter != clientList_.end(); ++iter) {
        message->async_send(*iter,
                boost::bind(&MsgProxy::handle_dispatch, this, _1, _2, _3));
    }
}

For reference, the handle dispatch function looks like this:

// Called to handle result of saync_send command in dispatch_msg
void MsgProxy::handle_dispatch(t_ic_msg_shptr messsage, t_socket_shptr socket_ptr, 
                   const boost::system::error_code &error) {
    if (error) {
    RDEBUG("Error forwarding message onto clients -- %s",
           error.message().c_str());
    }
}

And finally the async_send function that’s being called:

void async_send        (t_socket_shptr, t_icsend_callback);

Where t_icsend_callback is:

typedef boost::function<void (t_socket_shptr, const boost::system::error_code&)> 
                                                              t_icsend_callback;

Basically I’ve got a function (async_send) that takes a socket to send out a message on,
as well as a callback (defined using boost::function) to report status to asynchronously. I’m trying to bind a member to that boost::function argument, but boost doesn’t seem to like what I’m doing here. I’ve been up and down the boost::function and boost:bind documentation and it seems to me this should work… I even have a call that’s almost identical a little further up that’s not throwing an error… color me stumped.

  • 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-05-13T21:09:09+00:00Added an answer on May 13, 2026 at 9:09 pm

    t_icsend_callback is a function taking 2 agruments.

    boost::bind(&MsgProxy::handle_dispatch, this, _1, _2, _3)
    

    returns a function that takes 3 arguments.

    I think you want to say

       message->async_send(*iter,
                boost::bind(&MsgProxy::handle_dispatch, this, message, _1, _2));
    

    (note “message” as first bounded argument).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 375k
  • Answers 375k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer One has a descendant selector in the middle of it.… May 14, 2026 at 8:18 pm
  • Editorial Team
    Editorial Team added an answer For integers, try str = parseInt( str, 10 ). (note:… May 14, 2026 at 8:18 pm
  • Editorial Team
    Editorial Team added an answer The first time you assign to Tags_collect is inside the… May 14, 2026 at 8:18 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.