/**
\mainpage Overview

Freundlich's C++ Toolkit (fcppt) is a collection of libraries that aim
to improve general C++ code through better typing and functional programming.

\section source_and_downloads Source code and downloads

The source code and releases are available on <a href="https://github.com/freundlich/fcppt">github</a>.

\section installation_overview Installation

See \ref installation_usage on how to install fcppt and on how to use it in your project.

\section main_code_examples Introduction

Avoiding partial functions (functions that do not terminate, i.e. crash, on certain inputs)
is one of fcppt's main goals. These are, unfortunately, all over the place in common C or C++ code:
<code>std::unique_ptr</code> can be null, <code>operator[]</code> of <code>std::vector</code>
can be used for out-of-bounds access, iterators can be incremented past their end, and so on.
Partial functions place a huge burden on the programmer since they have to ensure that
no code path is taken that actually calls a function with invalid arguments.
Consider the following example, where we avoid partial functions:

\snippet main.cpp print_at_2

The #fcppt::container::at_optional function returns an optional reference
into the container, which the #fcppt::optional::maybe function uses to either
print the value or print that no element at position <code>2</code> exists.
Notice we do not ask explicitly if the optional has a value or dereference it
(which can crash if the value is null).

Explicit loops are another source of mistakes: The loop not only specifies what
to loop over but also how the result is formed. What to loop over is best expressed
using ranges, while forming the result can be expressed using
special algorithms. A very common operation is mapping one container into another.
Here, we want to convert a container of integers into a container of strings by
using #fcppt::output_to_std_string, which converts any type into a string
that has an output operator defined:

\snippet main.cpp vec_to_string

Code using a standard loop would allocate an empty vector and then use <code>push_back</code>
repeatedly. For good performance, it should also call <Code>reserve</code> before
the first <code>push_back</code>. All of this is nicely encapsulated in #fcppt::algorithm::map,
so that you only have to focus on how to transform <em>a single element</em> into another.

This also brings us to the next point, which is initialization. It is important to directly
initialize objects and declare them as <code>const</code> whenever possible.
Obviously you cannot do that with loops that change their result in each iteration, like by
calling <code>push_back</code>. There are, however, even more complicated cases in which
direct initialization becomes hard to express: Consider an array that
should be initialized <em>depending on its size</em>. For simplicity, let us initialize
each element with its index:

\snippet main.cpp init_array

Notice that the parameter is actually an integral constant, which we
use to access the <code>make_value</code> template.

To force initialization, fcppt also replaces certain standard types with types that have no
default constructor, for example #fcppt::unique_ptr, #fcppt::function
and #fcppt::variant::object.

Following is a list of a few other libraries (for a complete list, see the modules page at the top):
<ul>
<li>\ref fcpptrecord allows to create record types, which are a collection of statically named elements.</li>
<li>\ref fcpptoptions provides declarative command-line option parsers, similar to Haskell's <code>optparse-applicative</code> library.</li>
<li>\ref fcppteither carries a success or an error value. In comparison, \ref fcpptoptional only
has a single error value.</li>
<li>\ref fcpptoptional provides utility functions for optionals.</li>
<li>\ref fcpptenum allows, for example, to iterate over enums, convert enums from
and to strings, create arrays that are indexed by enums, and so on.</li>
</ul>

For more technical details, you can also take a look at our \ref code_style.

\section main_sitemap Site map

The documentation is split into the following parts:

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

<ul>
	<li>
		\link fcpptmain Documentation\endlink
	</li>
	<li>
		\subpage installation_usage
		<ul>
			<li>\ref installation_usage_requirements</li>
			<li>\ref installation_usage_tested_platforms</li>
			<li>\ref installation_usage_download</li>
			<li>\ref installation_usage_building_and_installation</li>
			<li>\ref installation_usage_using_fcppt</li>
			<li>\ref installation_usage_static_and_shared_builds</li>
		</ul>
	</li>
	<li>
		\subpage code_style
	</li>
	<li>
		\subpage changes
		<ul>
			<li>\ref changes_changes_to_520</li>
			<li>\ref changes_changes_to_510</li>
			<li>\ref changes_changes_to_500</li>
			<li>\ref changes_changes_to_461</li>
			<li>\ref changes_changes_to_460</li>
			<li>\ref changes_changes_to_450</li>
			<li>\ref changes_changes_to_441</li>
			<li>\ref changes_changes_to_440</li>
			<li>\ref changes_changes_to_430</li>
			<li>\ref changes_changes_to_421</li>
			<li>\ref changes_changes_to_420</li>
			<li>\ref changes_changes_to_410</li>
			<li>\ref changes_changes_to_400</li>
			<li>\ref older_changes</li>
		</ul>
	</li>
</ul>

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