<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [C++17] std::map::insert_or_assign w/ hint violate complexity requirements"
   href="https://bugs.llvm.org/show_bug.cgi?id=38722">38722</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[C++17] std::map::insert_or_assign w/ hint violate complexity requirements
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libc++
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>7.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>kariya_mitsuru@hotmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, mclow.lists@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The current implementations of std::map::insert_or_assign w/ hint
(const_iterator argument) ignore hint.

I think that they violate complexity requirements.

The C++17 standard [map.modifiers] p.14 and p.18 says,

Complexity: The same as emplace and emplace_hint, respectively.

and, Complexity column of emplace_hint in [associative.reqmts] table 90 says,

logarithmic in general, but amortized constant if the element is inserted right
before p

cf. <a href="https://wandbox.org/permlink/SvAYpldPEpx711TD">https://wandbox.org/permlink/SvAYpldPEpx711TD</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>