[libcxx-commits] [libcxx] Remove incorrect forward-declaration of lgamma_r header (PR #80979)

Yuriy Chernyshov via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 7 03:55:52 PST 2024


georgthegreat wrote:

This triggers upon #including `<random>` after `<cmath>`.

```
#include <iostream>
#include <cmath>
#include <random>

int main() {
    int state = 0;

    long double x;
    std::cin >> x;
    auto val = lgamma_r(x, &state);

    std::cout << "Gamma(" << x << ") = " << val << std::endl;

    return 0;
}
```

https://github.com/llvm/llvm-project/pull/80979


More information about the libcxx-commits mailing list