# Class Tag
Template for tag definition.

Defined in | <seqan/basic.h>
Signature | `template <typename T> struct Tag;`

## Template Parameters

`T` | Any parameterless types.

## Detailed Description

This `struct` is defined such that parameter less tags are easier recognizeable. This is best explained with the example below.

### Examples

Usually, tags are defined in the following way.

    struct SomeTag_;
    typedef Tag<SomeTag_> SomeTag;

They are then used as follows.

    template <typename T>
    void f(T const & x, SomeTag const & tag)
    {
        // ...
    }

    // Somewhere else:
    f(3, SomeTag());

This has the advantages that (1) the type of tag parameters is printed as `Tag<SomeTag_>` in compiler error traces. Furthermore, (2) parameter less tags can be defined redundantly in multiple headers and we can still instantiate them anywhere where they are declared. The latter (2) cannot be achieved with only forward declaration (`struct SomeTag;`) or full declarations (`struct SomeTag {};`) everywhere.

#### Dox Sources

    /*!
     * @class Tag
     *
     * @headerfile <seqan/basic.h>
     *
     * @brief Template for tag definition.
     *
     * @signature template <typename T> struct Tag;
     *
     * @tparam T Any parameterless types.
     *
     * This <tt>struct</tt> is defined such that parameter less tags are easier
     * recognizeable. This is best explained with the example below.
     *
     * @section Examples
     *
     * Usually, tags are defined in the following way.
     *
     * @code{.cpp}
     * struct SomeTag_;
     * typedef Tag<SomeTag_> SomeTag;
     * @endcode
     *
     *
     * They are then used as follows.
     *
     * @code{.cpp}
     * template <typename T>
     * void f(T const & x, SomeTag const & tag)
     * {
     *     // ...
     * }
     *
     * // Somewhere else:
     * f(3, SomeTag());
     * @endcode
     *
     *
     * This has the advantages that (1) the type of tag parameters is printed as
     * <tt>Tag&lt;SomeTag_&gt;</tt> in compiler error traces. Furthermore, (2)
     * parameter less tags can be defined redundantly in multiple headers and we can
     * still instantiate them anywhere where they are declared. The latter (2)
     * cannot be achieved with only forward declaration (<tt>struct SomeTag;</tt>)
     * or full declarations (<tt>struct SomeTag {};</tt>) everywhere.
     */