[Bug libstdc++/101236] [12 Regression] bits/unique_ptr.h:658:48: error: invalid use of incomplete type ‘class llvm::APFloat’ since r12-1778-g17bc3848e065c0980523e1a1592f2f03b24b4f1c

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jun 28 09:41:06 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101236

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|NEW                         |RESOLVED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
You can use incomplete types with std::unique_ptr<T> but the array
specialization, std::unique_ptr<T[]>, requires T to be a complete type. See
[unique.ptr.runtime.general] p3 in the C++ standard. That requirement has been
there since std::unique_ptr<T[]> was added in C++11.


So the code is invalid. LLVM needs to ensure the type is complete, or not use
std::unique_ptr<T[]> there.


More information about the Gcc-bugs mailing list