tables::table::rdrop
template <typename... Ts,is_primitive_type... Ps>
inline
constexpr table<std::pair<Ts,Ps>...>
table<std::pair<Ts,Ps>...>::rdrop(const std::size_t n) const
Returns table with last n rows dropped. Same as t.reverse().drop(n).reverse().
Example
Code
#include <cpptables/table.hh>
#include <iostream>
using namespace tables;
using namespace std;
struct c0{ constexpr static string_view name = "Col0"; };
struct c1{ constexpr static string_view name = "Col1"; };
using table_t = table<
pair<c0,string_view>,
pair<c1,double>
>;
void table_rdrop()
{
const table_t t(
{"abc","def","ghi", "abc","def","ghi"},
{10.0, 20.0, 30.0, 40.0, 50.0, 60.0}
);
const table_t t0 = t.rdrop(2);
cout << t0 << "\n";
}