# Concept AssignableConcept
A type with an assignment operator.

All Subcl's | AlphabetConcept, AlphabetWithGapsConcept, AlphabetWithQualitiesConcept, AlphabetWithUnknownValueConcept, ContainerConcept, FiniteOrderedAlphabetConcept, FormattedFileHeaderConcept, FormattedFileRecordConcept, ForwardContainerConcept, IntegerConcept, OrderedAlphabetConcept, RandomAccessContainerConcept, ReversibleContainerConcept, SegmentableConcept, SignedIntegerConcept, StringConcept, UnsignedIntegerConcept
Defined in | <seqan/basic.h>
Signature | `Assignable<T>`

## Detailed Description

Expects instances of type `T` to be assignable into each other.

### Valid Expressions

    a = b;  // a, b are of type T

## See Also

- DefaultConstructibleConcept

## Member Function Overview

- `T & T::operator=(T const & other);`
  C++ built-in assignment operator.

## Interface Function Overview

- `void assign(target, source);`
  Assigns one object to another object.
- `void move(target, source);`
  Hands over content from one object to another object.
- `set(target, source);`
  Assigns one object to another object avoiding to copy contents.

## Member Functions Detail

### `T & T::operator=(T const & other);`

C++ built-in assignment operator.

The C++ standard requires the assignment operator to be a member function.

#### Data Races

Thread safety unknown!

## Interface Functions Detail

### `void assign(target, source);`

Assigns one object to another object.

#### Parameters

`target` | Reference to assign to.
`source` | Value to assign.

Assign value of source to target.

#### Data Races

Thread safety unknown!

### `void move(target, source);`

Hands over content from one object to another object.

#### Parameters

`target` | Where to move source to.
`source` | What to move to target.

The default implementation will call assign and classes implementing AssignableConcept can override move to provide a more efficient implementation.

#### Data Races

Thread safety unknown!

### `set(target, source);`

Assigns one object to another object avoiding to copy contents.

#### Parameters

`target` | Reference to the set to source.
`source` | Value to set to target.

The default implementation copies. Types implementing AssignableConcept can implement more efficient variants.

#### Data Races

Thread safety unknown!

#### Dox Sources

    /*!
     * @concept AssignableConcept
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief A type with an assignment operator.
     *
     * @signature Assignable<T>
     *
     * Expects instances of type <tt>T</tt> to be assignable into each other.
     *
     * @section Valid Expressions
     *
     * @code{.cpp}
     * a = b;  // a, b are of type T
     * @endcode
     *
     *
     * @see DefaultConstructibleConcept
     *
     * @fn AssignableConcept::operator=
     *
     * @brief C++ built-in assignment operator.
     *
     * @signature T & T::operator=(T const & other);
     *
     * The C++ standard requires the assignment operator to be a member function.
     *
     * @fn AssignableConcept#assign
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Assigns one object to another object.
     *
     * @signature void assign(target, source);
     *
     * @param[out] target Reference to assign to.
     * @param[in] source Value to assign.
     *
     * Assign value of source to target.
     *
     * @fn AssignableConcept#set
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Assigns one object to another object avoiding to copy contents.
     *
     * @signature set(target, source);
     *
     * @param[out] target Reference to the set to source.
     * @param[in] source Value to set to target.
     *
     * The default implementation copies. Types implementing AssignableConcept can
     * implement more efficient variants.
     *
     * @fn AssignableConcept#move
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Hands over content from one object to another object.
     *
     * @signature void move(target, source);
     *
     * @param[out] target Where to move source to.
     * @param[in,out] source What to move to target.
     *
     * The default implementation will call @link AssignableConcept#assign @endlink
     * and classes implementing AssignableConcept can override move to provide a
     * more efficient implementation.
     */