   LEFT
 };
 
-// TODO Can probably just replace this with a std::pair
 // Each element of the result will be an index into the left and right columns where
 // left_columns[left_index] == right_columns[right_index]
-struct result_type 
-{
-  size_t left_index{};
-  size_t right_index{};
-
-  result_type() {}
-
-  result_type(size_t _l, size_t _r) : 
-    left_index{_l}, right_index{_r} {}
-
-  // Overload comparison so the result vector can be sorted
-  bool operator <(result_type const& rhs){
-    return( std::tie(left_index, right_index) < std::tie(rhs.left_index, rhs.right_index) );
-  }
-
-  bool operator ==(result_type const& rhs) const{
-    return ( std::tie(left_index, right_index) == std::tie(rhs.left_index, rhs.right_index) );
-  }
-
-  friend std::ostream& operator<<(std::ostream& os, const result_type& result);
-
-};
-
-// Overload the stream operator to make it easier to print a result 
-std::ostream& operator<<(std::ostream& os, const result_type& result)
-{
-  os << result.left_index << ", " << result.right_index << std::endl;
-  return os;
+using result_type = typename std::pair<int, int>;
+
+// Define stream operator for a std::pair for conveinience of printing results.
+// Needs to be in the std namespace to work with std::copy
+namespace std{
+  template <typename first_t, typename second_t>
+  std::ostream& operator<<(std::ostream& os, std::pair<first_t, second_t> const & p)
+  {
+    os << p.first << ", " << p.second;
+    return os;
+  }
 }
 
 // A new instance of this class will be created for each *TEST(JoinTest, ...)

          }
        default:
          std::cout << "Invalid join method" << std::endl;
          ASSERT_TRUE(false);
      }

    }

   * @Param sort Option to sort the result. This is required to compare the result against the reference solution
   */
  /* ----------------------------------------------------------------------------*/
  std::vector<result_type> compute_gdf_result(bool print = false, bool sort = true)
  {
    const int num_columns = std::tuple_size<multi_column_t>::value;

