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)
- Default constructor. Creates an indentor with the given step size and a starting indent of zero.
DEFAULT_STEPSIZEis2U. - Copy constructor. Copies step size and current indent.
- Move construction is deleted.
Parameters
| Parameter | Description |
|---|---|
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
- Indentation::~Indentation — destructor.
- Indentation::operator= — copy assignment.
- Indentation::DEFAULT_STEPSIZE — the default.

