24 [[nodiscard]]
constexpr indent(
int spaces = 4,
char space =
' ') noexcept :
25 _space(space), _spaces(spaces), _depth(0) {}
27 [[nodiscard]]
constexpr indent(
indent const &other) noexcept :
28 _space(other._space), _spaces(other._spaces), _depth(other._depth) {}
30 [[nodiscard]]
constexpr indent(
indent &&other) noexcept :
31 _space(other._space), _spaces(other._spaces), _depth(other._depth) {}
33 [[nodiscard]]
constexpr indent &operator=(
indent const &other)
noexcept
36 _space = other._space;
37 _spaces = other._spaces;
38 _depth = other._depth;
42 [[nodiscard]]
constexpr indent &operator=(
indent &&other)
noexcept
45 _space = other._space;
46 _spaces = other._spaces;
47 _depth = other._depth;
55 return std::string(narrow_cast<size_t>(_depth) * narrow_cast<size_t>(_spaces), _space);
Indentation for writing out text files.
Definition indent.hpp:16
constexpr indent & operator+=(int rhs) noexcept
Increase the depth of this indentation.
Definition indent.hpp:60
constexpr indent & operator++() noexcept
Increment the depth of this indentation.
Definition indent.hpp:68
constexpr friend indent operator+(indent lhs, int rhs) noexcept
Get an indentation at increased depth.
Definition indent.hpp:76
constexpr indent(int spaces=4, char space=' ') noexcept
Constructor This constructor will start indentation at depth 0.
Definition indent.hpp:24