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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:22:37+00:00 2026-05-16T05:22:37+00:00

//error C2784: ‘HRESULT get_wrapper(T *,boost::function<R(void)>)’ : //could not deduce template argument for ‘boost::function<R(void)>’ //from

  • 0
//error C2784: 'HRESULT get_wrapper(T *,boost::function<R(void)>)' : 
//could not deduce template argument for 'boost::function<R(void)>' 
//from 'boost::_bi::bind_t<R,F,L>'

STDMETHODIMP CAttributeValue::get_Name(BSTR* pVal)
{
    return get_wrapper(pVal, boost::bind<BSTR>(&CAttributeValue::getNameCOM, this)); //error here
}

template <class T> HRESULT get_wrapper(T* pVal, boost::function<T()> GetVal)
{
    if(!pVal)
        return E_POINTER;
    HRESULT status = E_FAIL;
    try {
        *pVal = GetVal();
        status = S_OK;
    } catch (...) {}
    return status;
}

BSTR CAttributeValue::getNameCOM() const
{
    BOOST_STATIC_ASSERT(sizeof(TCHAR)==sizeof(wchar_t));
    return TStr2CComBSTR(_name).Detach();
}
  • 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-16T05:22:37+00:00Added an answer on May 16, 2026 at 5:22 am

    Does it help to do this?

    return get_wrapper<BSTR>(pVal, boost::bind(&CAttributeValue::getNameCOM, this));
    //                ^^^^^^
    

    There is a conversion from the type returned by boost::bind to boost::function<T()>, but since this parameter depends on a template argument, the compiler won’t do any such conversions on your behalf.

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

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I am using the xml type column for this kind… May 16, 2026 at 11:02 am
  • Editorial Team
    Editorial Team added an answer Any content in /data/data (or wherever else the permissions specify)… May 16, 2026 at 11:02 am
  • Editorial Team
    Editorial Team added an answer Selects all columns from table events if the month equals… May 16, 2026 at 11:01 am

Trending Tags

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

Top Members

Related Questions

*Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be
I am trying ot add a function template that will print if it contains
Error: The ObjectContext instance has been disposed and can no longer be used for
Server Error in '/' Application. The model item passed into the dictionary is of
An error occurred at line: 9 in the jsp file: /Test1.jsp The method addURL(String,
I have an error in my first step with Java, so when i try
I'm getting this error: Only parameterless constructors and initializers are supported in LINQ to
Im getting this error when I try and make an object. Here is my
I am getting an error that tells me error: declaration of 'virtual FXHost::~FXHost()' throws
Having problem understanding Delegate error. Error says expression expected, How do I fix? Thanks

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.