<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shikaku</author_name>
  <author_url>https://blog.hatena.ne.jp/shikaku/</author_url>
  <blog_title>shikaku's blog</blog_title>
  <blog_url>https://blog.systemjp.net/</blog_url>
  <categories>
  </categories>
  <description>bAscendingOrderというBOOL型の変数をcompare関数に渡すには、ラムダ式を使用してこの変数をキャプチャします。そして、その変数をcompare関数内で使用することで、昇順か降順かを判定できるようにします。以下のコードは、bAscendingOrderをキャプチャして、比較処理に使用する例です。 auto compare = [index, bAscendingOrder](const ItemInfo&amp; a, const ItemInfo&amp; b) { if (a.values.size() &lt;= index || b.values.size() &lt;= index) retu…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.systemjp.net%2Fentry%2F2023%2F12%2F28%2F142302&quot; title=&quot;std::sortで指定する比較関数に追加の引数を渡す書き方 - shikaku&amp;#39;s blog&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>2023-12-28 14:23:02</published>
  <title>std::sortで指定する比較関数に追加の引数を渡す書き方</title>
  <type>rich</type>
  <url>https://blog.systemjp.net/entry/2023/12/28/142302</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
