Defined in header <cparse/Indentation.hh>

explicit Indentation( uint_fast16_t step_size = DEFAULT_STEPSIZE ) noexcept;   // (1)
Indentation( Indentation const& object )                            noexcept;   // (2)
Indentation( Indentation&& )                                     = delete;      // (3)
  1. Default constructor. Creates an indentor with the given step size and a starting indent of zero. DEFAULT_STEPSIZE is 2U.
  2. Copy constructor. Copies step size and current indent.
  3. Move construction is deleted.

Parameters

ParameterDescription
step_size(1) The step size — the number of spaces one call to right() or left() moves the indent by, per unit of the step argument.
object(2) The Indentation to copy.

Exceptions

noexcept in both defined overloads.

Notes

The explicit keyword prevents an integer from being silently converted into an Indentation. If you have a step size in hand, say so:

Indentation four_space_indent(4);   // OK
Indentation from_int = 4;           // ERROR: explicit constructor

See also