1#ifndef ITERATIONSTREAM_H
2#define ITERATIONSTREAM_H
11 template<
typename TYPE,
typename DERIVED>
14 [[nodiscard]] std::string elementsString()
const;
17 [[nodiscard]] std::string className()
const override;
18 [[nodiscard]] std::string toString(
bool enter)
const override;
22 template<
typename TYPE,
typename DERIVED>
23 auto original::iterationStream<TYPE, DERIVED>::elementsString() const -> std::
string
28 for (
const auto it = this->begin(); it.isValid(); ++it) {
32 ss << formatString(it.get());
39 template<
typename TYPE,
typename DERIVED>
40 auto original::iterationStream<TYPE, DERIVED>::compareTo(
const iterationStream &other)
const ->
int {
41 const auto this_it = this->begin();
42 const auto other_it = other.begin();
43 for (;this_it.isValid() && other_it.isValid(); ++this_it, ++other_it) {
44 if (*this_it != *other_it)
45 return *this_it < *other_it ? -1 : 1;
47 return this_it.isValid() - other_it.isValid();
50 template<
typename TYPE,
typename DERIVED>
51 auto original::iterationStream<TYPE, DERIVED>::className() const -> std::
string {
52 return "iterationStream";
55 template<
typename TYPE,
typename DERIVED>
56 auto original::iterationStream<TYPE, DERIVED>::toString(
const bool enter)
const -> std::string
59 ss << this->className() << this->elementsString();
60 if (enter) ss <<
"\n";
Definition comparable.h:6
Definition iterationStream.h:12