title: How to match the element of a double vector in google test in C++?
body: <p>In Google test framework to assert two doubles are equal we can use:</p>
  
  <pre><code>ASSERT_DOUBLE_EQ(val1, val2);
  </code></pre>
  
  <p>instead of </p>
  
  <pre><code>ASSERT_EQ(val1, val2);
  </code></pre>
  
  <p>To avoid precision issues. To compare the elements of a vector, the Google mock frame work has a nice macro called <code>ElementsAre</code>, Here is an example:</p>
  
  <pre><code>std::vector&lt;double&gt; vec{0.1,0.2};
  ASSERT_THAT(vec, ElementsAre(0.1, 0.2));
  </code></pre>
  
  <p>Is there way to use a matcher similar to <code>ASSERT_DOUBLE_EQ</code> to avoid precision related issues when using <code>ASSERT_THAT</code>?</p>