title: instantiate pair object in C++
body: <p>I have a vertex class with many objects, e.g.</p>
  
  <pre><code>class Vertex{
      int i;
  public:
      Vertex(const int &amp; a):i(a){}
  };
  
  Vertex v1(1),v2(2)...v100(100);
  </code></pre>
  
  <p>Now I want to make 50 pairs, each pair linking two vertices. What is the best way to achieve this? I definitely don't want to do the following:</p>
  
  <pre><code>std::pair&lt;const Vertex &amp;, const Vertex &amp;&gt; p1(v1,v2);
  ...
  std::pair&lt;const Vertex &amp;, const Vertex &amp;&gt; p50(v99,v100);
  </code></pre>
  
  <p>std::make_pair seems to be a better choice. But it only accept values, not references, if I understand correctly. Thanks a lot. </p>