tables::column::fills, fill_with, zfill
1)
template <is_primitive_type P>
column<P> column<P>::fills() const
2)
template <is_primitive_type P>
column<P> column<P>::fill_with(const prim_t val) const
3)
template <is_primitive_type P>
column<P> column<P>::fill_with(const column<P> c) const
4)
template <is_primitive_type P>
column<P> column<P>::zfill() const
'
-
Returns column with nones replaced by previous non-none value.
-
Returns column with nones replaced by val.
-
Returns column with nones replaced with elements from
c
. -
Returns column with nones replaced by zero.
Example
Code
#include <cpptables/table.hh>
using namespace tables;
using namespace std;
void column_fills()
{
constexpr unsigned none = prim_traits<unsigned>::none;
const column<unsigned> xs ({ 1, none, 3, 4 ,5, none });
cout << xs.fills() << "\n";
cout << xs.fill_with(99) << "\n";
cout << xs.zfill() << "\n";
const column<unsigned> ys ({ 10,20,30,40,50, 60});
cout << xs.fill_with(ys) << "\n";
}