tables::column::drop

template <is_primitive_type P>
column<P> drop(const std::size_t n) const

Returns column with first n elements dropped or empty column if n is more than size of column.

Complexity

Linear

Example

Code

#include <cpptables/table.hh>

using namespace tables;
using namespace std;

void column_drop()
{
  constexpr unsigned none = prim_traits<unsigned>::none;

  const column<unsigned> xs ({ 1, 2, 3, 4, 5, none});

  cout << xs.drop(2) << "\n";
}

Output

3 4 5 none