/**
\defgroup fcpptstrongtypedef fcppt.strong_typedef
\ingroup fcpptmain
\brief The strong typedef class and helper macros

<table id="toc">
<tr>
<td>

<ul>
	<li>\ref fcpptstrongtypedef_motivation</li>
	<li>\ref fcpptstrongtypedef_parameters</li>
	<li>\ref fcpptstrongtypedef_operations</li>
	<li>\ref fcpptstrongtypedef_internal</li>
	<li>\ref fcpptstrongtypedef_headers</li>
</ul>

</td>
</tr>
</table>


\section fcpptstrongtypedef_motivation Motivation

C++ offers <strong>typedefs</strong> to provide aliases (different names) for a
type. Typedefs are useful to shorten complicated types and to make type usage
consistent. However, they do not prevent accidental misuse. Consider:

\snippet strong_typedef.cpp motivation_string

Accidents like this can be prevented by creating new types
<code>first_name</code> and <code>email_address</code> that are wrappers around
strings. Because both of them are distinct types, they cannot be implicitly
converted into each other.

Strong typedefs are thin wrappers around types that are easy to define:

\snippet strong_typedef.cpp motivation_string_2

\section fcpptstrongtypedef_parameters Parameters

Strong typedefs are especially helpful to distinguish function parameters at
the type level. Consider the following function:

\snippet strong_typedef.cpp function

Even with parameter names in the function's declaration, the interface is easy to misuse.
For example, the following code will compile (possibly without any warnings):

\snippet strong_typedef.cpp bad_call

Instead, we introduce strong typedefs for the parameters.

\snippet strong_typedef.cpp parameters_strong_typedefs

The correct function call then looks like this:

\snippet strong_typedef.cpp parameter_call

\section fcpptstrongtypedef_operations Operations

The <code>get</code> function extracts the value of a strong typedef.

\snippet strong_typedef.cpp get

Strong typedef wraps almost all operators, which are found in their respective
headers.

\snippet strong_typedef.cpp operators

\section fcpptstrongtypedef_internal Internals

When declaring two strong typedefs with the same underlying type, two distinct
types need to be created:

\snippet strong_typedef.cpp strong_typedef_is_same

To achieve that, the #FCPPT_DECLARE_STRONG_TYPEDEF macro first
creates an empty struct containing the name you specify as the first parameter.
This is then used as the second parameter to #fcppt::strong_typedef to make it a distinct type.

\section fcpptstrongtypedef_headers Header files

<table>
<tr>
<th>Header file</th>
<th>Description</th>
</tr>
<tr>
<td><code>strong_typedef_fwd.hpp</code></td>
<td>Contains #fcppt::strong_typedef's declaration.</td>
</tr>
<tr>
<td><code>strong_typedef_decl.hpp</code></td>
<td>Contains #fcppt::strong_typedef's definition.</td>
</tr>
<tr>
<td><code>strong_typedef_impl.hpp</code></td>
<td>Contains the definition of #fcppt::strong_typedef's member functions.</td>
</tr>
<tr>
<td><code>strong_typedef.hpp</code></td>
<td>Includes <code>strong_typedef_impl.hpp</code>,
<code>strong_typedef_operators.hpp</code> and <code>strong_typedef_std_hash.hpp</code>.</td>
</tr>
<tr>
<td><code>strong_typedef_operators.hpp</code></td>
<td>Includes <code>strong_typedef_arithmetic.hpp</code>, <code>strong_typedef_assignment.hpp</code>,
<code>strong_typedef_bitwise.hpp</code> and <code>strong_typedef_comparison.hpp</code>.</td>
</tr>
<tr>
<td><code>strong_typedef_input.hpp</code></td>
<td>Contains <code>operator>></code>.</td>
</tr>
<tr>
<td><code>strong_typedef_output.hpp</code></td>
<td>Contains <code>operator<<</code>.</td>
</tr>
<tr>
<td><code>declare_strong_typedef.hpp</code></td>
<td>Contains #FCPPT_DECLARE_STRONG_TYPEDEF.</td>
</tr>
</table>
*/
