Created
February 26, 2017 14:56
-
-
Save stryku/114f6a656a9c197b42ec9615851679e7 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
namespace details | |
{ | |
template <typename> | |
struct string_front_impl; | |
template <char front, char ...chars> | |
struct string_front_impl<string<front, chars...>> | |
{ | |
static constexpr auto value = front; | |
}; | |
} | |
template <typename s> | |
constexpr auto string_front = details::string_front_impl<s>::value; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment