<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>blanketsky</author_name>
  <author_url>https://blog.hatena.ne.jp/blanketsky/</author_url>
  <blog_title>blanket log</blog_title>
  <blog_url>https://blanketsky.hatenadiary.org/</blog_url>
  <categories>
    <anon>C++</anon>
  </categories>
  <description>よく嵌るのでメモ。 大きなものから出てくる 比較関数の実装法は頭に入れておく コンパイラのエラーメッセージに期待しない priority_queue&lt;Hoge&gt; pq; のように使うHogeクラス では、デフォルトでは比較に std::less&lt;Hoge&gt; が使われるので operator&lt; の実装が必要。 class Hoge { ... bool operator&lt;(const Hoge &amp;a) const; }; 二つのconst を忘れると悲惨なことになります。 比較関数の部分を分離しようとすると、「型」が必要なので普通の関数でなくファンクタクラスが必要。 struct Compare…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblanketsky.hatenadiary.org%2Fentry%2F20070717%2F1184683160&quot; title=&quot; std::priority_queue  - blanket log&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-07-17 23:39:20</published>
  <title> std::priority_queue </title>
  <type>rich</type>
  <url>https://blanketsky.hatenadiary.org/entry/20070717/1184683160</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
