9namespace hi::inline v1 {
23 [[nodiscard]]
constexpr indent(
int spaces = 4,
char space =
' ') noexcept : _space(space), _spaces(spaces), _depth(0) {}
25 [[nodiscard]]
constexpr indent(
indent const &other) noexcept :
26 _space(other._space), _spaces(other._spaces), _depth(other._depth)
30 [[nodiscard]]
constexpr indent(indent &&other) noexcept : _space(other._space), _spaces(other._spaces), _depth(other._depth)
34 [[nodiscard]]
constexpr indent &operator=(indent
const &other)
noexcept
37 _space = other._space;
38 _spaces = other._spaces;
39 _depth = other._depth;
43 [[nodiscard]]
constexpr indent &operator=(indent &&other)
noexcept
46 _space = other._space;
47 _spaces = other._spaces;
48 _depth = other._depth;
56 return std::string(narrow_cast<std::size_t>(_depth) * narrow_cast<std::size_t>(_spaces), _space);
Indentation for writing out text files.
Definition indent.hpp:15
constexpr friend indent operator+(indent lhs, int rhs) noexcept
Get an indentation at increased depth.
Definition indent.hpp:77
constexpr indent & operator++() noexcept
Increment the depth of this indentation.
Definition indent.hpp:69
constexpr indent(int spaces=4, char space=' ') noexcept
Constructor This constructor will start indentation at depth 0.
Definition indent.hpp:23
constexpr indent & operator+=(int rhs) noexcept
Increase the depth of this indentation.
Definition indent.hpp:61