Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename Ret>
- void register_sorting_option(const int col, std::function<Ret(int, int)> f)
- {
- set_column_order(col, {{
- [f](int lhs, int rhs) { return f(lhs) < f(rhs); },
- [f](int lhs, int rhs) { return f(lhs) > f(rhs); }
- }});
- }
- template<>
- void register_sorting_option(const int col, std::function<bool(int, int)> f)
- {
- set_column_order(col, {{
- [f](int lhs, int rhs) { return f(rhs, lhs); },
- [f](int lhs, int rhs) { return f(lhs, rhs); }
- }});
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement