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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:53:59+00:00 2026-05-15T03:53:59+00:00

Sorry for the confusing title. Let me explain via code: #include <string> #include <boost\function.hpp>

  • 0

Sorry for the confusing title. Let me explain via code:

#include <string>
#include <boost\function.hpp>
#include <boost\lambda\lambda.hpp>
#include <iostream>

int main()
{
    using namespace boost::lambda;

    boost::function<std::string(std::string, std::string)> f =
        _1.append(_2);

    std::string s = f("Hello", "There");
    std::cout << s;

    return 0;
}

I’m trying to use function to create a function that uses the labda expressions to create a new return value, and invoke that function at the call site, s = f("Hello", "There");

When I compile this, I get:

1>------ Build started: Project: hacks, Configuration: Debug x64 ------
1>Compiling...
1>main.cpp
1>.\main.cpp(11) : error C2039: 'append' : is not a member of 'boost::lambda::lambda_functor<T>'
1>        with
1>        [
1>            T=boost::lambda::placeholder<1>
1>        ]

Using MSVC 9.

My fundamental understanding of function and lambdas may be lacking. The tutorials and docs did not help so far this morning.

How do I do what I’m trying to do?

  • 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-15T03:54:00+00:00Added an answer on May 15, 2026 at 3:54 am

    You need:

    boost::function<std::string(std::string, std::string)> f =
        boost::bind(&std::string::append, _1, _2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 537k
  • Answers 537k
  • 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 SELECT CASE WHEN @yourDateTime BETWEEN '19000101 00:00:00.000' AND '20790606 23:59:29.997'… May 17, 2026 at 1:47 am
  • Editorial Team
    Editorial Team added an answer drupal_parse_info_file() is the closest function, but it takes a file… May 17, 2026 at 1:47 am
  • Editorial Team
    Editorial Team added an answer I believe the general method for doing this is to… May 17, 2026 at 1:47 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

Sorry if the question title is confusing. Let me explain further. I am building
Sorry if the title seems confusing, but some examples are in order. Let's say
sorry for the confusing title, its really hard for me to explain what i
Sorry if the title is confusing. Here is the query I have Select MONTH(DATE(TIMESTAMP)),
Sorry for the confusing title.... We are developing an application to be used by
Sorry for the confusing title. I tried to make it less verbose, but... What
Sorry or the confusing title! It's actually a lot simpler than it sounds. I've
Sorry for the confusing title, but it basically says it all. Here's the structures
Well, sorry about the confusing title but I'm having a slightly annoying problem with
Sorry the title's so convoluted... I must've tried for ten minutes to get a

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.