Modify

Ticket #6962 (new Bugs)

Opened 5 years ago

[function] missing document function::assign()

Reported by: Akira Takahashi <faithandbrave@…> Owned by: dgregor
Milestone: To Be Determined Component: function
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

boost::function::assign() member function is undocument. This function can assign allocator object one of the few way. I hope documentation this function.

#include <cassert>
#include <memory>
#include <boost/function.hpp>

struct increment {
    int operator()(int x) const { return x + 1; }
};

int main()
{
    boost::function<int(int)> f;
    f.assign(increment(), std::allocator<increment>());

    assert(f(1) == 2);
}

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.