tahonermann / text_view

A C++ concepts and range based character encoding and code point enumeration library
MIT License
122 stars 14 forks source link

Add non-throwing next/prev/at alternatives to operator++/--/*/[] to text iterators #31

Closed tahonermann closed 7 years ago

tahonermann commented 7 years ago

Text iterators currently throw exceptions when encode/decode errors occur. Adding alternative non-throwing member functions may be helpful to allow code bases that cannot use exceptions to still use Text_view.

tahonermann commented 7 years ago

Since itext_view constructors decode eagerly, alternative non-throwing constructors would be required as well.

tahonermann commented 7 years ago

Closing this as not-to-be-fixed. As of commit 4950cdfda13cbfc9a20fcfbf4c85a7a9fcf1f8c6, exceptions are no longer thrown during decoding (e.g., during eager decoding), and error policies can be used to avoid use of exceptions altogether.