Listing 3: Tables.

template
<
  class Tuple,
  class SortList = typename Tuple::field_list,
  class Strategy = sorted_strategy,
  bool IsDistinct = false>

class table_iterator {...};

template
<
  class Tuple,
  class SortList = typename Tuple::field_list,
  class Strategy = sorted_strategy,
  bool IsDistinct = false>
class table
{
public:
  typedef typename Tuple::field_list field_list;
  typedef SortList sort_list;
  typedef Tuple value_type;
  typedef table_iterator<Tuple,SortList,Strategy,IsDistinct>
    const_iterator;
  enum {is_distinct = IsDistinct};
  const_iterator begin() const {...}
  const_iterator end() const {...}
  ... // range methods
private:
  ... // implementation details
};