Move - SeqAn API Documentation

# Tag Move
Switch to force move.

Defined in | <seqan/align.h>
Signature | `typedef Tag<Move_> Move;`

## Detailed Description

The difference between move constructor and copy constructor is that the source object is not copied but moved into the target object. The source object can lose its content and will be empty after this operation in this case. A move constructor can sigificantly faster than a copy constructor.

### Examples

    String source("hello");
    String target(source, Move()); // source is moved to target
    std::cout << source; //nothing printed since source lost content
    std::cout << target; //"hello"

Move constructors are like copy-constructors. However, their argument is not const.

    class Klass
    {
    public:
        seqan::String m;

        // Copy constructor, other is left untouched.
        Klass(Klass const & other) { ... }

        // Move constructor, leaves other and its members in an "empty" state.
        Klass(Klass & other, seqan::Move const &) { ... }
    };

## See Also

- move

#### Dox Sources

    /*!
     * @tag Move
     *
     * @headerfile <seqan/align.h>
     *
     * @brief Switch to force move.
     *
     * @signature typedef Tag<Move_> Move;
     *
     * The difference between move constructor and copy constructor is that the
     * source object is not copied but moved into the target object. The source
     * object can lose its content and will be empty after this operation in this
     * case. A move constructor can sigificantly faster than a copy constructor.
     *
     * @section Examples
     *
     * @code{.cpp}
     * String source("hello");
     * String target(source, Move()); // source is moved to target
     * std::cout << source; //nothing printed since source lost content
     * std::cout << target; //"hello"
     * @endcode
     *
     *
     * Move constructors are like copy-constructors. However, their argument is not
     * const.
     *
     * @code{.cpp}
     * class Klass
     * {
     * public:
     *     seqan::String m;
     *
     *     // Copy constructor, other is left untouched.
     *     Klass(Klass const & other) { ... }
     *
     *     // Move constructor, leaves other and its members in an "empty" state.
     *     Klass(Klass & other, seqan::Move const &) { ... }
     * };
     * @endcode
     *
     *
     * @see AssignableConcept#move
     */