IntegerConcept - SeqAn API Documentation

# Concept IntegerConcept
An integral type.

Extends | AssignableConcept, ComparableConcept, CopyConstructibleConcept, DefaultConstructibleConcept, DestructibleConcept, EqualityComparableConcept
All Extended | AssignableConcept, ComparableConcept, CopyConstructibleConcept, DefaultConstructibleConcept, DestructibleConcept, EqualityComparableConcept, LessThanComparableConcept
All Subcl's | SignedIntegerConcept, UnsignedIntegerConcept
Defined in | <seqan/basic.h>
Signature | `IntegerConcept<T>`

## Detailed Description

Expects an instance of type `T` to be of integral value and to provide the same operations as `int`. The integer concept imposes no restrictions on an available sign. Every type `T` that fulfills the IntegerConcept fulfills either the SignedIntegerConcept or the UnsignedIntegerConcept.

### Examples

    SEQAN_CONCEPT_ASSERT((IntegerConcept<int>));
    SEQAN_CONCEPT_ASSERT((IntegerConcept<char>));
    //SEQAN_CONCEPT_ASSERT((IntegerConcept<double>));                       // fails to compile

    std::cout << Is<IntegerConcept<char> >::VALUE << std::endl;             // 1
    std::cout << Is<IntegerConcept<int> >::VALUE << std::endl;              // 1
    std::cout << Is<IntegerConcept<unsigned short> >::VALUE << std::endl;   // 1
    std::cout << Is<IntegerConcept<double> >::VALUE << std::endl;           // 0

### Valid Expressions

    T a, b;
    int c;

    a = 0u;
    b = 1u;
    c = a;

    b = a + 1u;
    b = a + a;
    b += a;
    b += 1u;
    b = a++;
    b = ++a;

    b = a - a;
    b = a - 1u;
    b -= a;
    b -= 1u;
    b = a--;
    b = --a;

    b = a * a;
    b = a * 1u;
    b *= a;
    b *= 1u;

    b = a / a;
    b = a / 1u;
    b /= a;
    b /= 1u;

    b = a << a;
    b = a << 1;
    b <<= a;
    b <<= 1;

    b = a >> a;
    b = a >> 1;
    b >>= a;
    b >>= 1;

## Member Function Overview

### Member Functions Inherited From AssignableConcept

- `operator=`

### Member Functions Inherited From ComparableConcept

- `operator>`

### Member Functions Inherited From EqualityComparableConcept

- `operator!=`
- `operator==`

### Member Functions Inherited From LessThanComparableConcept

- `operator<`

## Interface Function Overview

### Interface Functions Inherited From AssignableConcept

- `assign`
- `move`
- `set`

### Interface Functions Inherited From ComparableConcept

- `operator<=`
- `operator>=`

#### Dox Sources

    /*!
     * @concept IntegerConcept
     *
     * @headerfile <seqan/basic.h>
     *
     * @extends ComparableConcept
     * @extends EqualityComparableConcept
     * @extends AssignableConcept
     * @extends CopyConstructibleConcept
     * @extends DefaultConstructibleConcept
     * @extends DestructibleConcept
     *
     * @brief An integral type.
     *
     * @signature IntegerConcept<T>
     *
     * Expects an instance of type <tt>T</tt> to be of integral value and to provide
     * the same operations as <tt>int</tt>. The integer concept imposes no
     * restrictions on an available sign. Every type <tt>T</tt> that fulfills the
     * @link IntegerConcept @endlink fulfills either the @link SignedIntegerConcept
     * @endlink or the @link UnsignedIntegerConcept @endlink.
     *
     * @section Examples
     *
     * @code{.cpp}
     * SEQAN_CONCEPT_ASSERT((IntegerConcept<int>));
     * SEQAN_CONCEPT_ASSERT((IntegerConcept<char>));
     * //SEQAN_CONCEPT_ASSERT((IntegerConcept<double>));                       // fails to compile
     *
     * std::cout << Is<IntegerConcept<char> >::VALUE << std::endl;             // 1
     * std::cout << Is<IntegerConcept<int> >::VALUE << std::endl;              // 1
     * std::cout << Is<IntegerConcept<unsigned short> >::VALUE << std::endl;   // 1
     * std::cout << Is<IntegerConcept<double> >::VALUE << std::endl;           // 0
     * @endcode
     *
     *
     * @section Valid Expressions
     *
     * @code{.cpp}
     * T a, b;
     * int c;
     *
     * a = 0u;
     * b = 1u;
     * c = a;
     *
     * b = a + 1u;
     * b = a + a;
     * b += a;
     * b += 1u;
     * b = a++;
     * b = ++a;
     *
     * b = a - a;
     * b = a - 1u;
     * b -= a;
     * b -= 1u;
     * b = a--;
     * b = --a;
     *
     * b = a * a;
     * b = a * 1u;
     * b *= a;
     * b *= 1u;
     *
     * b = a / a;
     * b = a / 1u;
     * b /= a;
     * b /= 1u;
     *
     * b = a << a;
     * b = a << 1;
     * b <<= a;
     * b <<= 1;
     *
     * b = a >> a;
     * b = a >> 1;
     * b >>= a;
     * b >>= 1;
     * @endcode
     */