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

    <tr>
        <th>Summary</th>
        <td>
            `#include <llvm/ADT/APFloat.h>` fails when compiling with `-std=c++2b`
        </td>
    </tr>

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

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

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

<pre>
    ```c++
#include <llvm/ADT/APFloat.h>
```
Results in
```
In file included from <source>:1:
In file included from /opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:19:
In file included from /opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/ArrayRef.h:13:
In file included from /opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/SmallVector.h:28:
In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/13.0.0/../../../../include/c++/13.0.0/memory:78:
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:139:18: error: invalid application of 'sizeof' to an incomplete type 'llvm::APFloat'
          static_assert(sizeof(_Tp)>0,
 ^~~~~~~~~~~
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:675:4: note: in instantiation of function template specialization 'std::default_delete<llvm::APFloat[]>::operator()<llvm::APFloat>' requested here
          get_deleter()(__ptr);
 ^
/opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:622:7: note: in instantiation of member function 'std::unique_ptr<llvm::APFloat[]>::~unique_ptr' requested here
class DoubleAPFloat final : public APFloatBase {
 ^
/opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:646:13: note: in implicit destructor for 'llvm::detail::DoubleAPFloat' first required here
      this->~DoubleAPFloat();
 ^
/opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:38:7: note: forward declaration of 'llvm::APFloat'
class APFloat;
 ^
In file included from <source>:1:
In file included from /opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:19:
In file included from /opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/ArrayRef.h:13:
In file included from /opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/SmallVector.h:28:
In file included from /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/13.0.0/../../../../include/c++/13.0.0/memory:78:
/opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/13.0.0/../../../../include/c++/13.0.0/bits/unique_ptr.h:726:9: error: subscript of pointer to incomplete type 'llvm::APFloat'
 return get()[__i];
 ^~~~~
/opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:654:38: note: in instantiation of member function 'std::unique_ptr<llvm::APFloat[]>::operator[]' requested here
  APFloat &getFirst() { return Floats[0]; }
 ^
/opt/compiler-explorer/libs/llvm/trunk/include/llvm/ADT/APFloat.h:38:7: note: forward declaration of 'llvm::APFloat'
class APFloat;
 ^
2 errors generated.
Compiler returned: 1
```
When compiling with `clang++ -std=c++2b`, but works fine with `g++`.
https://godbolt.org/z/KWhddY6PM
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsV19v2zYQ_zT0C2FDJvXPD36w4wgYhgFFV6zYk0FJJ4srRarksWn60M8-UJLtOHG2bMOCoqhhOIrI-_e7u9-Rwjl50ABrkmxJspsJj62x66q10oGypp6Vpr5fkzQavxVh2_CNdiTaEMalrpSvgRJ-o9SnjrBis3sXft8UyghctITfTpuPKsZ_34LzCh2V-uryT5o2UgGd9Ne0saYLVpzxtoKglW-WhG_-cjsrTI-EFZXpeqnAzuFzr4wFS1ihZOnCn9FrtF5_IKyYFJwXnoSzWa5ez6y14v4tNKNd_mp2f-2EUr9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