Created
February 26, 2017 15:09
-
-
Save stryku/01d324295727a2e96a713f2762ed890f 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...>, sign, nex_val>::value; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment