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

    <tr>
        <th>Summary</th>
        <td>
            [libc++][test] Precondition violation in rand.dist.uni.real/param_ctor.pass.cpp
        </td>
    </tr>

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

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

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

<pre>
    https://github.com/llvm/llvm-project/blob/ccae7b461be339e717d02f99ac857cf0bc7d17fc/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/param_ctor.pass.cpp#L32-L36

This violates the Standard's preconditions, and MSVC's STL asserts about it. The Standardese is [N4986](https://isocpp.org/files/papers/N4986.pdf) \[rand.req.dist\]/9:

> For each of the constructors of `D` taking arguments corresponding to parameters of the distribution, `P` shall have a corresponding constructor subject to the same requirements and taking arguments identical in number, type, and default values.

And \[rand.dist.uni.real\]/2:

> `explicit uniform_real_distribution(RealType a, RealType b = 1.0);`
> *Preconditions:* `a <= b` and `b - a <= numeric_limits<RealType>::max()`.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlE1v4zYQhn_N-DKIQFGWZB108MfqlBaLxug1GFIji1vqY0nKSP59QcVJnbSHrmFYlOh5h_No5iXvzWVkriE_QH7a0BL6ydVPgeeexvMjXenKPzZqal_rPoTZQ7YH2YBsLib0i0r0NIBsrL2-Xx5mN_1gHUA2yk4KZKM1cam2Rao4yyou07IVsqsq0ru81J1QumzTstNRwCj98gKyCeyjgg8tyGZcBnZGe5CNo7G9XZLWrP_5WCfLaL7eJ47JgmxmcjQ86zC5ZCbvEz3PILPHTD48ZgWIE4j92--5Nx6vZrIU2GPoGZ8CjS25FmTpcXasp7E1wUyjB3lEGlv87enP47r7dH5E8p5d8EhqWgKakOD5ToQ9o_EI-eH3bbUrID-B3H0Ga_yk5zmZ3AVk0xnLfj3_zC4u1rBkbjuQFUJ-hPywFuz45xuQ-OgEsqmi4F1hkH3DZnLIpHucurU0PY0-uCVi8fEZFOIEhcBAf5nxguQuy8Bj8Kgn59jPsfLxgmHClScHfouLWjG5M2qJZCIYKMT3qOV7shZ7ujLSF5279OgXFbsmakc1TwOj45-Lcfx2hAj6X-cyLY_BaLJoRhyXQbGLucPrzO8vp-WOFhvwSnZhn9wj2Y_tPcLPPfPOUf4HRygEv8zWaBNwGU03ueE5Bj1_hrD7g8meX2dGiqf5uFMI2QnTRICsIDtAIe6k5f77px6LbbGPGQkhO8ZAFbHG0qAQCh_wY-M2J8_WDCZ4yI7vGSH7FnWy_UAvIHcxbSFuKDZtnbVVVtGG67SU6a6Mn01fl6nSebbVOxJdnuXMeVoq0W1TsdXlbpdvTC2F3IpS5iKTMi-T2JqFokJVRalk2sFW8EDGJtEXYkNvjPcL16kQuSg2lhRbvzqPlHHyQR7Wr4xO5OrVTdRy8bAV1vjg_9EJJtjVs-7C8hPkh9U38hPeM7yNc1yZEf-vPWwWZ3_d8tYC45zearzW8u8AAAD__4E2tzM">