Opened 10 years ago

#6962 new Bugs

[function] missing document function::assign()

Reported by: Akira Takahashi <faithandbrave@…> Owned by: Douglas Gregor
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);
}

Change History (0)

Note: See TracTickets for help on using tickets.