title: error: no matching member function for call to 'upper_bound' => only on macOS => Windows and Linux are fine
body: <p>I'm compiling a code inspired by <a href="https://codereview.stackexchange.com/q/158369/141750">this</a> with Qt Creator. Code compiles fine on Windows 10 and openSUSE Leap 15 but throws this error on macOS High Sierra:</p>
  
  <pre><code>error: no matching member function for call to 'upper_bound'
          auto end = band.upper_bound({ 0, last-&gt;y + d });
                     ~~~~~^~~~~~~~~~~
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/set:692:14: note: candidate function not viable: cannot convert initializer list argument to 'const std::__1::set&lt;Point, std::__1::less&lt;Point&gt;, std::__1::allocator&lt;Point&gt; &gt;::key_type' (aka 'const Point')
      iterator upper_bound(const key_type&amp; __k)
               ^
  </code></pre>
  
  <p>My header contains:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;algorithm&gt;
  #include &lt;cmath&gt;
  #include &lt;iostream&gt;
  
  struct Point {
      float x{0}, y{0};
  
      // Used by the `set&lt;point&gt;` to keep the points in the band
      // sorted by Y coordinates.
      bool operator&lt;(Point const &amp;other) const {
          return y &lt; other.y;
      }
  
      friend std::ostream &amp;operator&lt;&lt;(std::ostream &amp;os, Point const &amp;p) {
          return os &lt;&lt; "(" &lt;&lt; p.x &lt;&lt; ", " &lt;&lt; p.y &lt;&lt; ")";
      }
  
  };
  </code></pre>
  
  <p>My source contains:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;set&gt;
  
  std::pair&lt;Point, Point&gt; nearest_pair(std::vector&lt;Point&gt; points)
  {
      std::sort(points.begin(), points.end(),
                [](Point const &amp;a, Point const &amp;b) {
          return a.x &lt; b.x;
      }
      );
  
      // First and last points from `point` that are currently in the "band".
      auto first = points.cbegin();
      auto last = first + 1;
  
      // The two closest points we've found so far:
      auto first_point = *first;
      auto second_point = *last;
  
      std::set&lt;Point&gt; band{ *first, *last };
  
      float d = dist(*first, *last);
  
      while (++last != points.end()) {
          while (last-&gt;x - first-&gt;x &gt; d) {
              band.erase(*first);
              ++first;
          }
  
          auto begin = band.lower_bound({ 0, last-&gt;y - d }); // ERROR line
          auto end = band.upper_bound({ 0, last-&gt;y + d });   // ERROR line
  
          assert(std::distance(begin, end) &lt;= 6);
  
          for (auto p = begin; p != end; ++p) {
              if (d &gt; dist(*p, *last)) {
                  first_point = *p;
                  second_point = *last;
                  d = dist(first_point, second_point);
              }
          }
  
          band.insert(*last);
      }
      return std::make_pair(first_point, second_point);
  }
  </code></pre>
  
  <p>I guess I need to modify my <code>Point</code> structure, but I'm not sure how. Can anybody help?</p>
  
  <hr>
  
  <h2>Update</h2>
  
  <p>Error got resolved by adding these two constructors to <code>Point</code> structure:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>    Point(){
  
      }
  
      Point(float x, float y):
          x(x)
        , y(y)
      {
  
      }
  </code></pre>