tables::table::col,_col
1)
template <typename... Ts,is_primitive_type... Ps>
template<typename T>
requires in<T,std::tuple<Ts...>>
inline
const auto
table<std::pair<Ts,Ps>...>::col() const
2)
template <typename... Ts,is_primitive_type... Ps>
template<typename T>
requires in<T,std::tuple<Ts...>>
inline
auto
table<std::pair<Ts,Ps>...>::_col()
-
Returns column for lookup-type T.
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_col()
{
const table_t t(
{"abc","def","ghi", "abc","def","ghi"},
{10.0, 20.0, 30.0, 40.0, 50.0, 60.0}
);
cout << t.col<c1>() << "\n";
}