/*!

\page cxx11_support C++11 support in DCMTK

You may compile DCMTK with C++11 support enabled. This may increase performance
since some operations can be performed in a more efficient manner, e.g.
utilizing
<a href="http://en.cppreference.com/w/cpp/language/move_constructor">move semantics</a>.
To create a C++11 build of DCMTK, you simply need to set the appropriate
compiler-flags while building it (e.g. -std=c++11).  This will however not
enable DCMTK to use available C++11 features that aren't implicitly used by
legacy code.  This is especially important regarding some C++11 classes DCMTK
directly supports, for example:

\li OFunique_ptr (std::unique_ptr)
\li OFshared_ptr (std::shared_ptr)
\li OFnumeric_limits (std::numeric_limits)
\li OFtuple (std::tuple)
\li OFerror_code (std::error_code)

Since not every compiler supports C++11, legacy implementations for the
respective functionality have been created, which are enabled <i>by default</i>.

If you use C++11 in your project, you may want to use the native C++11 classes
and features instead, so you don't need to convert your objects to use them
with DCMTK.  To do so, you need to configure DCMTK to use the C++11 STL, which
is described below.

<h1>Enabling DCMTK to use C++11</h1>

By enabling DCMTK to use C++11, you gain the following advantages:

\li DCMTK will use available C++11 features instead of its only legacy
    implementations.  These are probably more efficient and complete.
\li The enabling of C++11 becomes part of DCMTK's configuration, which allows
    DCMTK to assist you when checking for API/ABI (in-)compatibility between
    C++11 and non C++11 builds.

Trying to include a DCMTK build with C++11 enabled from a non C++11
environment will give you the following error message:

@verbatim
DCMTK was configured to use C++11 features, but your compiler does not or was
not configured to provide them.
@endverbatim

To reduce DCMTK's implementation complexity, C++11 shall only be used if your
compiler <i>conforms closely</i> to the C++11 Standard.  As far as we know,
this is currently true for the following compilers:

\li GNU C++ Compiler (g++) Version 4.8.1 or later.
\li Clang (clang++) Version 3.3 or later.
\li According to <a href="https://learn.microsoft.com/en-us/cpp/overview/install-c17-support?view=msvc-170">
Microsoft documentation</a>, Visual Studio 2019 Version 16.8 (or higher)
with Windows SDK 10.0.20348.0 Version 2104 (or higher). DCMTK already allows
enabling C++11 for VS 2017 which reportedly also works well.

To enable the C++11 STL, different steps are necessary on CMake and GNU
Autoconf, see the appropriate section below:

<h2>CMake</h2>

Request building with C++11 features by setting the option
<kbd>DCMTK_ENABLE_CXX11</kbd> to <i>On</i>, for example via:

@verbatim
cmake ... -DDCMTK_ENABLE_CXX11:BOOL=ON ...
@endverbatim

CMake detects the C++11 compilers and knows how to enable C++11 features on
Clang, GCC and Intel compilers.  You can override the assumed compiler flags
(for example to enable C++14 instead) by modifying
<kbd>DCMTK_CXX11_FLAGS</kbd>, for example:

@verbatim
cmake ... -DDCMTK_ENABLE_CXX11:BOOL=ON -DDCMTK_CXX11_FLAGS=-std=c++14 ...
@endverbatim

CMake will then perform basic checks to ensure the compiler is configured
correctly and conforms closely enough to C++11 standard.  If everything
works CMake will print something like this:

@verbatim
-- Checking whether the compiler supports C++11
-- Checking whether the compiler supports C++11 -- yes
-- Info: C++11 features enabled
@endverbatim

<h3>Unsupported Compilers</h3>

If our CMake setup does not know how to enable C++11 on your compiler, it will
simply assume that no configuration is required (e.g. for Visual Studio).  If
this is not appropriate you have to set <kbd>DCMTK_CXX11_FLAGS</kbd> manually
as mentioned above.
If you enable C++11 via <kbd>DCMTK_ENABLE_CXX11</kbd> for an unsupported
compiler, CMake will simply set the flags provided via
<kbd>DCMTK_CXX11_FLAGS</kbd> (if any) and still run the C++11 compatibility
test to the compiler conforms closely enough to the C++11 standard for being
able to compile DCMTK.  If it doesn't, CMake will give an output similar to
this one:

@verbatim
-- Checking whether the compiler supports C++11
-- Checking whether the compiler supports C++11 -- no
-- Info: C++11 features disabled
@endverbatim

At this point you will not be able to enable C++11 features for the given
compiler, since building DCMTK would fail if you did.  If you are sure that
your compiler supports C++11, you should try setting different flags as
<kbd>DCMTK_CXX11_FLAGS</kbd>.

<h2>GNU Autoconf</h2>

Our GNU Autoconf setup understands the switches <kbd>\--enable-cxx11</kbd>,
and <kbd>\--disable-cxx11</kbd> that may be used to configure DCMTK to use
C++11 features.  If you run

@verbatim
configure --enable-cxx11
@endverbatim

our Autoconf script will try to determine the required compiler flags for
enabling C++11 features (if any) and perform configuration tests to ensure
the compiler conforms closely enough to the C++11 standard.  If everything
works it will give you an output similar to this one:

@verbatim
checking whether to enable C++11 support...
checking whether c++ supports C++11 features by default... no
checking whether c++ supports C++11 features with -std=c++11... yes
checking whether to enable C++11 support... yes
@endverbatim

Otherwise, it will still disable C++11 features with an output like this:

@verbatim
checking whether to enable C++11 support...
checking whether c++ supports C++11 features by default... no
checking whether c++ supports C++11 features with -std=c++11... no
checking whether to enable C++11 support... no
@endverbatim

*/
