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

    <tr>
        <th>Summary</th>
        <td>
            libc++ implementation's use of "__bound" conflicts with Windows SDK SAL macro
        </td>
    </tr>

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

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

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

<pre>
    I'm a Chromium dev trying to upgrade Chromium to C++20.  Chromium/Win builds with libc++ and the Windows SDK, and under C++20, the two together have problems because Windows' longstanding SAL macros clash with the libc++ implementation.

Specifically, in various headers (specstrings.h, most notably) Windows #defines "__bound" (and many other leading-double-underscore annotations), while in a few places (at least include/__iterator/{next,prev,advance}.h) libc++ tries to use "__bound" as a parameter name.  This leads to compile errors.

Arguably, SAL never should have used leading-double-underscore annotations, though them being reserved was presumably precisely _why_ they did so.  But now that they have, I suspect there's zero chance of Microsoft changing.  So I propose that libc++ just use a different variable name than "__bound".
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU8tu2zAQ_Br5QsSw6bi2DjrkgQBB21MK9GhQ4kpiSpECH3bdr-8s3SbxoUABw1ouydmZ2WXr9bl5ruRuEko8jMFPJk9C01GkcDZuEMmLPA9BaXrfRu6hkvf4ydVSvOUr-fTdONFmY3UUJ5NGYU3bXU4K5bRIIwkc0f4Uxcvj50o-lHR2msI7JKf5ZDp5lBoIcRCjOpKYg28tTVG01Kkc38DAX1jvhpgAx6xf7r6ISXXBR9FZFccLGwb9wMhMM8DIJZWMd8tq9Vit7i7_LzN1pjedsvbMdCDrqILxOYqR4EWIopL7iFMxBRSMy5GPTT4m4XxSLV-r37RWcqOpN444lIdD6yEZEYOwAZNyZ-GLTgt4AN5onyH1plgTOx8ITjEyU4XemsudRmOJuSnR00nMVnWlwl4lxgEX4zqbNaEzh4NJFFTyAYtqd-_oZwLGHOiIj9JH5Tqqdo8spP7oEvQBlMcAfl-zVxGVZxXURMAWDl-Mw7fRxCKj3Or8NDNLCsGHeGXyXRjyxamH0jBHR6DE0WerL_1GSf2_jvDM-DyULk8YEB6DQJHCERgnUIXUmCcuyGFnIiE6nMbzga-chTZaRA8B95mbeEIWPpYtJsMVnkXM3PSSDkjtovhFASpHtk_4Xnw1PHW-TyU3gAUQXzyuYnhnDw8L7AeDXzMaxeYqUOh74LpUpg1UqZjKV9y198uFbja63tRqkUyy1PxzrgtJhge56_Z13vXWdOnPW_3wMN_fzyIH24wpzbHa3PHkyKcBh3O7RGOxsPb493MDga_wBksTYyb05Gm7Xdfbxdisd6reSK1udz1ez06udb3frPRerrbrvu_3C6tasrGptlAgHYa5QCCuto8L08iVlKtbWa93t_v1p-W6_qT2Uqltr2nT6011u6JJGbtkHksfhkVoCqU2DxGb1sQU3zdVjGZwRKUc8FXG6IRm_oEng4YtSu2mcP8NrcS7KA">