Instead of explicit instantiation for each supported char type and an extra copy for documentation generation reduce to only a single template and instantiate the whole class explicitly. To ensure a reasonable error is generated introduce an is_supported_char-trait and static_assert on it. To further reduce the repetition when instantiating the templates create a macro to loop over the supported char types.
Instead of explicit instantiation for each supported char type and an extra copy for documentation generation reduce to only a single template and instantiate the whole class explicitly. To ensure a reasonable error is generated introduce an
is_supported_char
-trait andstatic_assert
on it. To further reduce the repetition when instantiating the templates create a macro to loop over the supported char types.