namespace fcppt
{
namespace container
{
/// Contains fcppt::container::bitfield::object and helper types/functions for it.
namespace bitfield
{
}
}
}

/**
\defgroup fcpptcontainerbitfield fcppt.container.bitfield
\ingroup fcpptcontainer
\brief A statically sized bitfield

\section bitfield_main Bitfields

Consider the states "a person can be hungry and tired, not hungry and tired,
hungry and not tired or not hungry and not tired". Being hungry and being tired
are orthogonal states which can be implemented using the bit representation of
an enumeration:

\code
enum person_status
{
	hungry = 1,
	tired = 1 << 1,
	// insert more options here
};
\endcode

This has a multitude of problems: It abuses enums, it is tiresome to write and
it is limited by the number of bits the biggest integer type can hold. To fix
this, a bitfield is indexed by natural numbers instead of powers of two and can
hold an arbitrary (but fixed) number of bits.

A bitfield is used together with an enum type that fulfils the requirements of \ref fcpptenum.

Here's a small example:

\snippet container/bitfield.cpp bitfield

As you can see, you can treat a bitfield like an integral type -- it has
bitwise <code>operator&, operator|</code> and so on. But you can also treat it
like a <code>std::map<Enum,bool></code>.
*/
