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

  • Home
  • SEARCH
  • 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

Related Questions

I am getting this error on code that used to work. I have not
I have a database with a table which is full of conditions and error
Full disclaimer: I'm a CS student, and this question is related to a recently
The full error is The base class includes the field 'ScriptManager1', but its type
The full error is as follows: The type 'System.Windows.Forms.Control' is defined in an assembly
See the full error here: http://notesapp.heroku.com/ I'm using DataMapper and dm-validations 0.10.2. No matter
Seems like cuke doesn't show the full error message (at least when problem occurs
Code: http://pastebin.com/h8WuYbJn Full error: Fatal error : Call to undefined function AddUser() in C:\xampp\htdocs\scripts\steam.php
I get this error object has no attribute 'im_func' with this class Test(object): def
Well the full error is Error 3 'OfType' is not a member of 'System.Text.RegularExpressions.MatchCollection'

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.