This file contains 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 <size_t ...values> | |
struct values_container | |
{}; |
This file contains 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 <typename container> | |
struct starts_with_123 | |
{ | |
static constexpr bool value = ...; | |
} |
This file contains 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 <typename> | |
struct starts_with_123_impl; |
This file contains 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 <size_t ...values> | |
struct starts_with_123_impl<values_container<values...>> | |
{}; |
This file contains 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 <size_t ...rest_of_values> | |
struct starts_with_123_impl<values_container<1, 2, 3, rest_of_values...>> | |
{}; |
This file contains 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 <size_t ...rest_of_values> | |
struct starts_with_123_impl<values_container<1, 2, 3, rest_of_values...>> | |
{ | |
static constexpr bool value = true; | |
}; | |
template <size_t ...values> | |
struct starts_with_123_impl<values_container<values...>> | |
{ | |
static constexpr bool value = false; |
This file contains 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 <typename container> | |
constexpr auto starts_with_123 = starts_with_123_impl<container>::value; |
This file contains 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 starts_with_123_impl; | |
template <size_t ...values> | |
struct starts_with_123_impl<values_container<1, 2, 3, values...>> | |
{ | |
static constexpr bool value = true; | |
}; |
This file contains 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 <char ...chars> | |
struct string | |
{ | |
static constexpr auto size = sizeof...(chars); | |
}; |
This file contains 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 str> | |
struct to_string_impl; | |
template <char ...chars> | |
struct to_string_impl<string<chars...>> | |
{ | |
using type = string<chars...>; | |
}; |
OlderNewer