|
DCMTK Version 3.7.1
OFFIS DICOM Toolkit
|
Starting from release 3.7.1, DCMTK requires compilation with C++11 support enabled. Later C++ standards can be enabled using the CMAKE_CXX_STANDARD setting. DCMTK's INSTALL file describes the available C++ standard versions that are known to work for the given DCMTK version.
While some features like move semantics are automatically enabled in legacy code when compiling with C++11 enabled, modern C++ STL classes like std::unique_ptr must be used explicitly.
DCMTK comes with some wrapper classes for some of STL features that in previous releases were not required to be provided by the compiled. Each wrapper class either directly maps to the respective C++ feature or otherwise implements a fallback solution that works with a C++98 compiler. For example, the following C++11 STL classes are implemented that way:
Enabling the flag DCMTK_ENABLE_STL will ensure that whenever possible (i.e. supported correctly by the compiler) the STL version of a class is preferred over the fallback implementation. Starting with DCMTK 3.7.1, this is the default.
Explicitly setting the flag DCMTK_ENABLE_STL to "OFF" will enable DCMTK's own, now deprecated, implementations.
There are several other flags in order to fine-tune this behavior:
Per default, those flags are set to "INFERRED", meaning that they take over the setting of DCMTK_ENABLE_STL. However, if you just want to enable or disable certain features (i.e. deviate from DCMTK_ENABLE_STL), you can set each of them explicitly to "ON" or "OFF".
When using the GNU Autoconf toolchain, there are switches that enable or disable STL features, comparable to the CMake configuration described above:
--enable-stl use C++ STL (default) --disable-stl do not use C++ STL --enable-stl-vector use C++ STL vector --disable-stl-vector do not use C++ STL vector --enable-stl-algorithm use C++ STL algorithm --disable-stl-algorithm do not use C++ STL algorithm ....
Support for setting C++ versions later than C++11 is not yet available in DCMTK's Autoconf settings.