title: error: no matching function for call to ‘get(long unsigned int*&, long unsigned int&)’ with union_set
body: <p>This code</p>
  
  <pre><code>table_edges[ this_relationship ] = boost::add_edge(
      table_vertices[ string( foreign_keys[i]["parent_table"].c_str() ) ], 
      table_vertices[ string( foreign_keys[i]["child_table"].c_str() ) ], 
      this_relationship, 
      rg
  ).first;
  ds.union_set( 
      table_vertices[ string( foreign_keys[i]["parent_table"].c_str() ) ],
      table_vertices[ string( foreign_keys[i]["child_table"].c_str() ) ] 
  );
  </code></pre>
  
  <p>gives this error and many others regarding get</p>
  
  <blockquote>
    <p>/usr/include/boost/pending/detail/disjoint_sets.hpp:59:33: error: no matching function for call to ‘get(long unsigned int*&amp;, long unsigned int&amp;)’</p>
  </blockquote>
  
  <p>I am using bundled properties.</p>
  
  <pre><code>typedef boost::adjacency_list &lt; 
     boost::vecS, 
     boost::vecS, 
     boost::undirectedS, 
     string, 
     foreign_key_relationship  
  &gt; relational_graph;
  </code></pre>
  
  <p>The rank &amp; parent typedefs are declared globally.</p>
  
  <p>How can this error be resolved?</p>
  
  <hr>
  
  <pre><code>struct foreign_key_relationship{
      string parent_table;
      string parent_column;
      string child_table;
      string child_column;
  
      foreign_key_relationship(){}
  
      foreign_key_relationship( string pt, string pc, string ct, string cc ) : parent_table( pt ), parent_column( pc ), child_table( ct ), child_column( cc ) {}
  
  };
  
  inline bool operator==(const foreign_key_relationship&amp; lhs, const foreign_key_relationship&amp; rhs)
  {
      return 
          lhs.parent_table == rhs.parent_table 
          &amp;&amp; lhs.parent_column == rhs.parent_column 
          &amp;&amp; lhs.child_table == rhs.child_table 
          &amp;&amp; lhs.child_column == rhs.child_column 
      ;
  }
  
  inline bool operator&lt;(const foreign_key_relationship&amp; lhs, const foreign_key_relationship&amp; rhs)
  {
      return 
          lhs.parent_table &lt; rhs.parent_table 
          &amp;&amp; lhs.parent_column &lt; rhs.parent_column 
          &amp;&amp; lhs.child_table &lt; rhs.child_table 
          &amp;&amp; lhs.child_column &lt; rhs.child_column 
      ;
  }
  
  typedef boost::adjacency_list &lt; boost::vecS, boost::vecS, boost::undirectedS, string, foreign_key_relationship  &gt; relational_graph;
  typedef boost::graph_traits&lt;relational_graph&gt;::vertex_descriptor relational_vertex;
  typedef boost::graph_traits&lt;relational_graph&gt;::vertices_size_type relational_vertex_index;
  typedef boost::graph_traits&lt;relational_graph&gt;::edge_descriptor relational_edge;
  typedef relational_vertex_index* relational_rank;
  typedef relational_vertex* relational_parent;
  
  void libpqxx_error( const pqxx_exception &amp;e ){
      cerr &lt;&lt; "*** Caught pqxx_exception:\n";
      cerr &lt;&lt; e.base().what() &lt;&lt; "\n";
      const sql_error *s=dynamic_cast&lt;const sql_error*&gt;(&amp;e.base());
      if (s) std::cerr &lt;&lt; "Query was: " &lt;&lt; s-&gt;query() &lt;&lt; "\n";
  }
  
  void connect_relational_vertices( map&lt; foreign_key_relationship, relational_edge &gt; &amp;table_edges, result &amp;foreign_keys, set&lt;string&gt; &amp;tables_to_connect, map&lt; string, relational_vertex &gt; &amp;table_vertices, relational_graph &amp;rg, boost::disjoint_sets&lt;relational_rank, relational_parent&gt; &amp;ds ){
      for( unsigned i=0; i&lt;foreign_keys.size(); i++ ){
          foreign_key_relationship this_relationship(
              foreign_keys[i]["parent_table"].c_str(),
              foreign_keys[i]["parent_column"].c_str(),
              foreign_keys[i]["child_table"].c_str(),
              foreign_keys[i]["child_column"].c_str()
          );
          if( !table_edges.count( this_relationship ) &amp;&amp; tables_to_connect.count( foreign_keys[i]["parent_table"].c_str() ) &amp;&amp; tables_to_connect.count( foreign_keys[i]["child_table"].c_str() ) ){
              table_edges[ this_relationship ] = boost::add_edge(
                  table_vertices[ string( foreign_keys[i]["parent_table"].c_str() ) ], 
                  table_vertices[ string( foreign_keys[i]["child_table"].c_str() ) ], 
                  this_relationship, 
                  rg
              ).first;
              ds.union_set( table_vertices[ string( foreign_keys[i]["parent_table"].c_str() ) ], table_vertices[ string( foreign_keys[i]["child_table"].c_str() ) ] );
          }
      }
  }
  
  void add_possible_linking_vertex( result &amp;foreign_keys, map&lt; string, relational_vertex &gt; &amp;table_vertices, relational_graph &amp;rg ){
      for( unsigned i=0; i&lt;foreign_keys.size(); i++ ){
          if( !table_vertices.count( foreign_keys[i]["parent_table"].c_str() ) ){
              table_vertices[ foreign_keys[i]["parent_table"].c_str() ] = boost::add_vertex( foreign_keys[i]["parent_table"].c_str(), rg );
              break;
          }
          if( foreign_keys[i]["child_table"].c_str() ){
              table_vertices[ foreign_keys[i]["child_table"].c_str() ] = boost::add_vertex( foreign_keys[i]["child_table"].c_str(), rg );
              break;
          }
      }
  }    
  
  set&lt; foreign_key_relationship &gt; get_foreign_keys( transaction_base &amp;t, set&lt;string&gt; tables_to_connect ){
      try{
          result foreign_keys = t.prepared("get_foreign_keys").exec();
  
          set&lt; foreign_key_relationship &gt; relational_routes;
  
          if( tables_to_connect.size() ){
  
              relational_graph rg;
  
              map&lt; string, relational_vertex &gt; table_vertices;
              for( string table: tables_to_connect )
                  table_vertices[ table ] = boost::add_vertex( table, rg );
  
              std::vector&lt;relational_vertex_index&gt; rank( num_vertices(rg) );
              std::vector&lt;relational_vertex&gt; parent( num_vertices(rg) );
  
              boost::disjoint_sets&lt;relational_rank, relational_parent&gt; ds(&amp;rank[0], &amp;parent[0]);
  
              boost::initialize_incremental_components(rg, ds);
              boost::incremental_components(rg, ds);
  
              map&lt; foreign_key_relationship, relational_edge &gt; table_edges;
              for( unsigned i=0; i&lt;foreign_keys.size(); i++ )
                  connect_relational_vertices( table_edges, foreign_keys, tables_to_connect, table_vertices, rg, ds );
  
          }
  
          return relational_routes;
      }
      catch( const pqxx_exception &amp;e ){
          libpqxx_error( e );
          set&lt; foreign_key_relationship &gt; relational_routes;
          return relational_routes;
      }
  }
  </code></pre>
  
  <p>I am using libpqxx, and the query to find all foreign key relationships is <a href="https://dba.stackexchange.com/questions/78082/select-all-foreign-key-relationship-chains-from-any-set-of-potentially-gapped-ta">here</a>.</p>