Skip to content

Instantly share code, notes, and snippets.

@stryku
Last active March 26, 2017 18:54
Show Gist options
  • Save stryku/c9f87f104b570d61f0f60ba1a312b7e9 to your computer and use it in GitHub Desktop.
Save stryku/c9f87f104b570d61f0f60ba1a312b7e9 to your computer and use it in GitHub Desktop.
template <char curr_char, char ...str_chars, typename current_token>
struct get_token_impl<string<curr_char, str_chars...>, current_token>
{
using string_without_token_char = string<str_chars...>;
using result_t = get_token_impl<string_without_token_char, string_append<current_token, curr_char>>;
using result_token = typename result_t::result_token;
using rest_of_string = typename result_t::rest_of_string;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment