diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-10-10 22:35:38 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-10-10 22:47:59 +1100 |
| commit | d652ec9ce1f6bebeeadec92348d1f756f03cff32 (patch) | |
| tree | 2fff726e3ea8433b27e79d5fc0d2231dab278771 /src/utils.hh | |
| parent | 9024d41d64627fd6a59b5ad66987e11e2d228f16 (diff) | |
Cleanup regex lookarounds implementation and reject incompatible regex
Fixes #2487
Diffstat (limited to 'src/utils.hh')
| -rw-r--r-- | src/utils.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.hh b/src/utils.hh index f21be9c1..ec6965a8 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -148,6 +148,12 @@ bool skip_while_reverse(Iterator& it, const BeginIterator& begin, T condition) return condition(*it); } +template<typename E> +auto to_underlying(E value) +{ + return static_cast<std::underlying_type_t<E>>(value); +} + } #endif // utils_hh_INCLUDED |
