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

    <tr>
        <th>Summary</th>
        <td>
            [libc++][ranges] `views::drop` uses non-reserved identifiers `dist` and `clamped`
        </td>
    </tr>

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

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

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

<pre>
    Example:

```c++
#define dist
#define clamped
#include <ranges>
```

**Expected**: this program should compile
**Got**:
```console
In file included from <source>:3:
In file included from /opt/compiler-explorer/clang-trunk-20230210/bin/../include/c++/v1/ranges:353:
/opt/compiler-explorer/clang-trunk-20230210/bin/../include/c++/v1/__ranges/drop_view.h:258:17: error: expected unqualified-id
      auto dist = ranges::distance(__rng);
 ^
/opt/compiler-explorer/clang-trunk-20230210/bin/../include/c++/v1/__ranges/drop_view.h:259:20: error: expected unqualified-id
      auto clamped = std::min<_Dist>(dist, std::forward<_Np>(__n));
 ^
[...]
```

Compiler explorer: https://godbolt.org/z/TGKEa818f
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVE-PuzYQ_TTDxQoyNrDkwCG7CT-1VXvqPTL2QNw1NrXN7nY_fWVCsm3U9lCpamSRMJl_773xiBD0aBFbqJ6hOmZiiRfn2-9_FJ-Lf9X4ruVn1jv1W3v6ENNsEPgB6BHo7VnT65HAntO5WhlXOGiLROkQH23SiGlGdTdrK82ikAB_8cKOGICfHrL_qSRL5_Qxo4yorm_ADyRedCCzd6MXEwkXtxhFpJtmbfCPgd9cvMc8YnA2uJv3d5YM2iDZulNk8G5KPQa3eImpR37g9yR_4846N0dg3daI3-HHbJxHn2xG2HEX_WJfd4wyTllBgXW9tsC6PAfWbcmS70Yv694KYN2NpwOvvlr4r4qdz1s51inv5vObxvf8AvzAqgb4oXhK7KP3zq8_NmHIYn9dhNGDRrXTm9pk_YglunUyCPAjuWMBfkhGYSUCa85nb0dge-DbUBGoTv8b0H160n8FdBv3FWuI6gp00hb4y_mYrgc_AWvWi8JevjwG59-FV8nrp_nqcz7bRMhfc1I953kO1fEfbs7LRhe508UP5BLjvLLPOmDd6FTvTMydH4F1n8C6n7_9cBJN0QyZarna873IsC3qp5qyqtyX2aVle9U3bJAomprT5qkXRS_6oqS13FNKZabbmxAF5U1R5kPJZUXLcpD0qVayh5LiJLTJjXmbUu1Mh7BgW9O6ajIjejRh3VCMWXwn65_AWFpYvk0xu34ZA5TU6BDDV5aoo1lXm9H9TevqCNXzpnN1JFDTJPNt_ryboaZkCRiIdXbnMaB_Q0W0QhuTxj6kmFWumhJhVXq9rbSaZos37QOnOl6WPpduAtal3rav3ezdLyjTIK-I0tytiH8PAAD__61MqXc">