.. index:: cpp11-migrate =========================== cpp11-migrate User's Manual =========================== .. toctree:: :hidden: UseAutoTransform UseNullptrTransform LoopConvertTransform :program:`cpp11-migrate` is a standalone tool used to automatically convert C++98 and C++03 code to use features of the new C++11 standard where appropriate. Basic Usage =========== ``cpp11-migrate [options] [... ]`` ``...`` specify the paths of files in the CMake source tree, with the same requirements as other tools built on LibTooling. Command Line Options -------------------- .. option:: -fatal-assembler-warnings Treat all compiler warnings as errors. .. option:: -help Displays tool usage instructions and command line options. .. option:: -loop-convert Makes use of C++11 range-based for loops where possible. See :doc:`LoopConvertTransform`. .. option:: -use-nullptr Makes use of the new C++11 keyword ``nullptr`` where possible. See :doc:`UseNullptrTransform`. .. option:: -use-auto Replace the type specifier of variable declarations with the ``auto`` type specifier. See :doc:`UseAutoTransform`. .. option:: -p= ```` is a CMake build directory containing a file named ``compile_commands.json`` which provides compiler options for building each source file and can be generated by specifying ``-DCMAKE_EXPORT_COMPILE_COMMANDS`` when running CMake. If ```` is not provided the ``compile_commands.json`` file is searched for through all parent directories. Alternatively, one can provide compile options to be applied to every source file after the optional ``--``. .. option:: -risk= Some transformations may cause a change in semantics. In such cases the maximum acceptable risk level specified through the ``-risk`` command line option decides whether or not a transformation is applied. Three different risk level options are available: ``-risk=safe`` Perform only safe transformations. ``-risk=reasonable`` (default) Enable transformations that may change semantics. ``-risk=risky`` Enable transformations that are likely to change semantics. The meaning of risk is handled differently for each transform. See :ref:`transform documentation ` for details. .. option:: -version Displays the version information of this tool. .. _transforms: Transformations =============== * :doc:`LoopConvertTransform` * :doc:`UseNullptrTransform` * :doc:`UseAutoTransform`