tables::column::append

1)

template <is_primitive_type P>
column<P> append(const P val) const

2)

template <is_primitive_type P>
column<P> append(const column<P>& col) const

  1. Returns column with val appended to the end.

  2. Returns column with column appended to the end.

Complexity

Constant

Example

Code

#include <cpptables/table.hh>

using namespace tables;
using namespace std;

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

  const column<unsigned> ys = xs.append(1);
  cout << ys << "\n";

  const column<unsigned> zs = xs.append(xs);
  cout << zs << "\n";
}

Output

1 2 3 4 5 6

1 2 3 4 5 1 2 3 4 5