Last active
January 11, 2017 11:46
-
-
Save picanumber/a4f1496d103280b141dc14bfd07eeaec to your computer and use it in GitHub Desktop.
interface of the sorted view class
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 <class... Args> | |
class sorted_view | |
{ | |
std::tuple<Args...> _ts; | |
mutable std::vector<std::size_t> _is; | |
public: | |
sorted_view(Args&&... args); | |
// sort based on the Ith sequence | |
template <std::size_t I, class F> void sort(F&& bop) const; | |
// size of the Ith sequence | |
template <std::size_t I = 0> auto size() const; | |
// the SORTED element of the Ith sequence at position pos | |
template <std::size_t I> decltype(auto) at(std::size_t pos); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment