Last active
April 10, 2017 18:27
-
-
Save stryku/3c8313191bb2f036f1cd02c28c016be6 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 <size_t, bool, typename> | |
struct values_drop_impl; | |
template <size_t ...left> | |
struct values_drop_impl<0, true, values_container<left...>> | |
{ | |
using type = values_container<left...>; | |
}; | |
template <size_t count, size_t to_drop, size_t ...left> | |
struct values_drop_impl<count, false, values_container<to_drop, left...>> | |
{ | |
using type = typename values_drop_impl<count-1, | |
count == 1, | |
values_container<left...>>::type; | |
}; | |
} | |
template <size_t count, typename values> | |
using values_drop = typename details::values_drop_impl<count, count==0, values>::type; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment