summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/cpp/include/CodePointRangeIteratorResult.hpp
blob: 086ddfce0802330912f974aad1a73af80817de59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CodePointRangeIteratorResult_HPP
#define CodePointRangeIteratorResult_HPP
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include <algorithm>
#include <memory>
#include <variant>
#include <optional>
#include "diplomat_runtime.hpp"

#include "CodePointRangeIteratorResult.h"



/**
 * Result of a single iteration of [`CodePointRangeIterator`].
 * Logically can be considered to be an `Option<RangeInclusive<u32>>`,
 * 
 * `start` and `end` represent an inclusive range of code points [start, end],
 * and `done` will be true if the iterator has already finished. The last contentful
 * iteration will NOT produce a range done=true, in other words `start` and `end` are useful
 * values if and only if `done=false`.
 */
struct CodePointRangeIteratorResult {
 public:
  uint32_t start;
  uint32_t end;
  bool done;
};


#endif