Defined in header <cparse/Indentation.hh>

void left( uint_fast16_t step = 1 ) noexcept;

Decreases the current indent by step * getStepSize() raw units. If the subtraction would go below zero, the indent is set to zero instead.

Parameters

ParameterDescription
stepNumber of steps to move left. Default 1.

Return value

(none)

Exceptions

noexcept.

Notes

Under-flow is guarded: left(1000) on an indent of 4 results in 0, not a wrapped-around large value.

Symmetric to right(). Typical call is a bare left() at the end of a nested emission block:

getStream() << getIndentor() << "if (cond)\n"
            << getIndentor() << "{\n";
getIndentor().right();
emitBody();
getIndentor().left();
getStream() << getIndentor() << "}\n";

See also