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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:00:24+00:00 2026-06-17T17:00:24+00:00

I have got this weird error when compiling my project with Visual Studio 2012:

  • 0

I have got this weird error when compiling my project with Visual Studio 2012:

error C2562: 'std::_Callable_obj<_Ty>::_ApplyX' : 'void' function returning a value C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap

When jumping in xrefwrap, the error comes from this line:

_VARIADIC_EXPAND_0X(_APPLYX_CALLOBJ, , , , )

My code compiles fine with GCC on Linux.. Plus the compiler gives me no information on what is causing this error.

What could be the cause of this error? I suspect this piece of code might be the source, but only because I use std::ref there:

_listener.addSocket(clientSock, std::bind(&Client::handleReceive, &client,
                                          _1, std::ref(*this)),
                    std::bind(&Lounge::handleClientDisconnect, this,
                              std::cref(client)));

Here are the two signatures of the member functions I am binding:

bool  Client::handleReceive(std::shared_ptr<TBSystem::network::sockets::ITcpSocket>& socket,
                        Lounge& lounge);

void  Lounge::handleClientDisconnect(const Client& c);

I do return a value in Client::handleReceive.

And this is the two std::function prototypes I am using when calling addSocket:

typedef std::function<bool (std::shared_ptr<sockets::ITcpSocket>&)> readCallback;
typedef std::function<void ()> disconnectCallback;
  • 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-17T17:00:25+00:00Added an answer on June 17, 2026 at 5:00 pm

    Well, turns out in one of my file I added a listener with the wrong prototype (std::plus)…

    _listener.addSocket(serverSocket,
                        std::bind(&Lounge::acceptClient, this, _1),
                        std::bind(std::plus<int>(), 0, 0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got this weird error when I was trying to compile matlab to C++
I have been puzzled by this weird problem and it got me stuck. Please
I've got this weird error when i try to generate either the filters or
I got this weird error which mentions I should install VSTS 2008 SP1, during
I am building a WPF application, I got this weird error : Unable to
I have got this code: function init(){ if (typeof window.jQuery !== 'function') { var
I have got this text file with latitude and longitude values of different points
I have got this code: $subject=<<<EOD <object height=400 width=500><param name=allowfullscreen value=false> <param name=AllowScriptAccess value=always>
I have got this regex pattern that works with my current apache log format:
I have got this result with the answer given by bluefeet Equipt BSL AQ

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.