Defined in <stlab/test/model.hpp>
class move_only

A class used to illustrate and test move-only semantics

A move_only instance is limited to move-only assignment and construction. It contains an integer that can be used for identification and is read with the member() function.

Member Functions

(constructor) Default-constructs a move_only
(destructor) Default-destructs a move_only

Example 1

#include <stlab/test/model.hpp>

using namespace stlab;

auto make_move_only() {
    return move_only(42);

int main(int, char**) {
    auto a = make_move_only();

        move_only ctor
        move_only dtor