Re: Replace Gtk::manage() with std::unique_ptr<>?

On Mon, 2016-02-08 at 11:56 +0000, Jonathan Wakely wrote:
A cleaner API would operate in terms of rvalues returned from
functions, and passed straight into other functions, avoiding
std::move entirely.

Do you mean like this?


That's already possible by just taking a std::unique_ptr<> by value.

However, I wouldn't want to enforce that if it forced people to write
code like this, without being able to break it up into separate lines:

      create_button("some button")));

Murray Cumming
murrayc murrayc com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]