<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/63743>63743</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            apt fails to compile with clang trunk/17.0.0
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kraj
      </td>
    </tr>
</table>

<pre>
    Attached is preprocessed file which fails to compile with clang trunk + libc++, this works ok with libstdc++ and clang also works ok with clang-16, this is on aarch64/x86_64

```
| /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/apt/2.6.1-r0/recipe-sysroot/usr/include/c++/v1/__algorithm/sort.h:290:44: error: invalid operands to binary expression ('const APT::C
 ontainer_iterator<APT::VersionContainerInterface, std::vector<pkgCache::VerIterator>, APT::VersionContainer<std::vector<pkgCache::VerIterator>>>' and 'difference_type' (aka 'long'))  for (_RandomAccessIterator __i = __first + difference_type(1); __i != __last; ++__i) {
 ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
```

[test.zip](https://github.com/llvm/llvm-project/files/11984023/test.zip)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2vqzYQ_TXDxgqC4SssWJDch_R2VVV1i4wZgl8cG9nm3psu-tsrQ5JW_VB1LcvYnpkz9vFhuHPyookaKE5QvEV89bOxzdXyH9FgxnvTes_FTCOTji2WFmsEOUcjm6Qi9jFLMbOJS-WYN0yY27JtSz8zobi-MG9XfWWAJ6bkIABPWz8zP0vHPoy9Omaue4CSg_Pjw4dxPT4guHLmb66b4ZCWLyTpmNGMcyvmMgfsPo9lX-aQvEHSPsYyefR9WZ0ZYHfTHrAbALu7obDmzpMNW6tUI2DnbwtgF7IDdsJYT5-8wsNjVmQHYe-LN4e7oYOSev0E7PgSQDEu4_RgE8DOkpALHdzdWWOCbXUhh9RCrWNI-yKme08Bu77n6mKs9PMNsHPG-niGrMU6gazNc8haRtYaGyZSv3MlR2YWslyP2zsMUnN7Z_S5WHJOGs0Aj4CVMNp51v70C2QtZO15p4IZ7bnUZHvpyXIfcM8vp1_JBoTz0-m79mQnLihw7_y4e72T2OOW6-UcBPMK_v7C_BYi_hMXsvMX0faO1SYVwGqU00SWtKDe3xcKFsAjv_JgVEZfACvAGrBmbDI2GPufuR7NrRVB1E9s1veSQfbG-n6S1vlNvf8AP6YBKzvt3pjuAYo7Hzb39-x7GbJBdXow_fveGBTfnvO_tH8X6j4WJ0_Ox7_JBYo3wOPs_eICLdgBdhfp53WIhQl6Uer9-Tks1vwgESQX_lcH2KVpfcwTzIK2n4hY71miscnGOqt5RE1aHo9VXlZVHc0Nr6ehIJ5N6YhpOZVjXYpyyDkmWJTVUEWywQSzpEqqtEzrrI7zMs9rFMVQpPmYo4A8oRuXKg7Hio29RNK5lZoyq_IsUnwg5bYihKjpg21GQAw1yTbbVYb14iBPlHTe_YnipVfU8MX_fxUKl6_iJE6i1armywRuRwoMbkf-IwAA___byqaG">