diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2012-10-13 18:31:29 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2012-10-13 19:05:14 +0200 |
| commit | dfafcdb6e6b52ebdd5b664b7561e682c32762663 (patch) | |
| tree | fd94329d686633260b7ec9dd4162287eb6225898 /src/utf8_iterator.hh | |
| parent | 4f1ab5b74935d3250c41bbee5f347ec4f815063c (diff) | |
utf8::codepoint: configurable invalid byte policy
Diffstat (limited to 'src/utf8_iterator.hh')
| -rw-r--r-- | src/utf8_iterator.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/utf8_iterator.hh b/src/utf8_iterator.hh index e782e297..b3077dc8 100644 --- a/src/utf8_iterator.hh +++ b/src/utf8_iterator.hh @@ -11,7 +11,8 @@ namespace utf8 // adapter for an iterator on bytes which permits to iterate // on unicode codepoints instead. -template<typename Iterator> +template<typename Iterator, + typename InvalidPolicy = InvalidBytePolicy::Throw> class utf8_iterator { public: @@ -125,7 +126,7 @@ private: Codepoint get_value() const { if (m_value == -1) - m_value = utf8::codepoint(m_it); + m_value = utf8::codepoint<InvalidPolicy>(m_it); return m_value; } |
