Last active
April 9, 2017 22:44
-
-
Save stryku/c11bb4fc73c7ca1eb5e60dc578d8f6ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <int sign, int current_val, char current_char, char ...chars> | |
struct string_to_int_impl<string<'-', current_char, chars...>, sign, current_val> | |
{ | |
static constexpr auto nex_val = current_val * 10 + (current_char - '0'); | |
static constexpr auto value = string_to_int_impl<string<chars...>, -1, nex_val>::value; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment