Skip to content

Instantly share code, notes, and snippets.

@stryku
Last active April 9, 2017 20:07
Show Gist options
  • Save stryku/9f5bbf6d7044a64231ca9198120385c4 to your computer and use it in GitHub Desktop.
Save stryku/9f5bbf6d7044a64231ca9198120385c4 to your computer and use it in GitHub Desktop.
namespace details
{
template <typename>
struct starts_with_123_impl;
template <size_t ...values>
struct starts_with_123_impl<values_container<1, 2, 3, values...>>
{
static constexpr bool value = true;
};
template <size_t ...values>
struct starts_with_123_impl<values_container<values...>>
{
static constexpr bool value = false;
};
}
template <typename container>
constexpr auto starts_with_123 = details::starts_with_123_impl<container>::value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment