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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:14:53+00:00 2026-05-23T15:14:53+00:00

During a conversation on boost::bind , it was noted that std::bind1st exists in C++03,

  • 0

During a conversation on boost::bind, it was noted that std::bind1st exists in C++03, but that it is “almost unusable”.

I can’t find anything solid to back this up.

The boost::bind documentation says:

boost::bind is a generalization of the
standard functions std::bind1st and
std::bind2nd. It supports arbitrary
function objects, functions, function
pointers, and member function
pointers, and is able to bind any
argument to a specific value or route
input arguments into arbitrary
positions. bind does not place any
requirements on the function object;
in particular, it does not need the
result_type, first_argument_type and
second_argument_type standard
typedefs.

perhaps suggesting that these restrictions do apply to std::bind1st.

Other than the obvious restriction on number of arguments, what are the advantages of boost::bind to std::bind1st/std::bind2nd? Is there any merit to the assertion that std::bind1st is “almost unusable” in C++03?

  • 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-23T15:14:53+00:00Added an answer on May 23, 2026 at 3:14 pm

    If we look at C++03 20.3.6.1 and 20.3.6.2, then we see that for the functor argument to bind1st we have a requirement of three typedefs (for the result type, first and second argument), and that the resulting operator only takes one argument.

    This means that we cannot just use bind1st easily on plain function pointers as they do not have those typedefs. Also we can only use bind1st on binary functions as we have no support for more parameters. Furthermore boost::bind et al have the advantage of being able to reorder the parameters, and of course support more than just the first.

    It seems to me that the most use cases for a binder are for free functions and member functions, and not for functor objects; as such the use of bind1st is quite limited (though extensible through the use of other tools like ptr_fun, but it’s questionable as to whether this makes it more usable). Of course this is only based on personal experience, but someone might want to do a Google code search statistic for bind1st.

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

Sidebar

Related Questions

During a typical day programming, I implement functions in a way that I would
During my work with databases I noticed that I write query strings and in
During execution, how can a java program tell how much memory it is using?
I have a dictionary .plist that has a subarray in it, however during the
I keep hearing that it's bad practise to store large object collections / anything
Summary I recently had a conversation with the creator of a framework that one
During a conversation on IRC, someone pointed out the following: decimal.Parse(1.0000).ToString() // 1.0000 decimal.Parse(1.00).ToString()
Ever stumbled on a tutorial that you feel is of great value but not
How can i make sure at conversion and validation phase during the JSF lifecycle
Is it possible in windows phone 7 application to record conversation during incoming or

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.