title: Error when trying initialize a set in a class
body: <p>I define a class named Quote and there is a multiset in it:</p>
  <pre><code>class Quote
  
  {
  public:
      Quote()=default;
      Quote(const std::string&amp; book, double sales_price) :
          bookNo(book), price(sales_price) {}
  
      std::string isbn() const { return bookNo; }
  private:
      std::string bookNo;
      static bool compare(const std::shared_ptr&lt;Quote&gt; &amp;lhs, const std::shared_ptr&lt;Quote&gt; &amp;rhs)
      {
          return lhs-&gt;isbn() &lt; rhs-&gt;isbn();
      }
      std::multiset&lt;std::shared_ptr&lt;Quote&gt;, decltype(compare)*&gt;   items(compare);
  protected:
      double price = 0.0;
      
  };
  </code></pre>
  <p>But my IDE(Visual Studio) shows that <a href="https://i.stack.imgur.com/Askme.png" rel="nofollow noreferrer">function Quote::compare is not a type name</a></p>
  <p>I usually initialize a set this way out of a class and it works well. Why that happens in a class? Thanks.</p>