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

    <tr>
        <th>Summary</th>
        <td>
            Compilation fails on trunk with "incomplete definition of type"
        </td>
    </tr>

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

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

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

<pre>
    Hi, I have a code using boost::beast which compiles fine using latest Clang 14.0.6 but does not compile with 15.0.0-rc1 or trunk: https://godbolt.org/z/oK75bEaeG.

Full error:
```
In file included from <source>:4:
In file included from /opt/compiler-explorer/libs/boost_1_79_0/boost/beast/core.hpp:24:
In file included from /opt/compiler-explorer/libs/boost_1_79_0/boost/beast/core/buffers_suffix.hpp:144:
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/core/impl/buffers_suffix.hpp:147:47: error: incomplete definition of type 'boost::asio::is_const_buffer_sequence<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>>'
        net::is_const_buffer_sequence<Buffers>::value ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/core/detail/variant.hpp:201:22: note: in instantiation of member function 'boost::beast::buffers_suffix<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>>::buffers_suffix' requested here
        ::new(&buf_) mp11::mp_at_c<variant, I - 1>(
                     ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/serializer.hpp:114:21: note: in instantiation of function template specialization 'boost::beast::detail::variant<boost::beast::buffers_suffix<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>>, boost::beast::buffers_suffix<boost::beast::buffers_cat_view<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>, boost::asio::const_buffer>>, boost::beast::buffers_suffix<boost::asio::const_buffer>, boost::beast::buffers_suffix<boost::beast::buffers_cat_view<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>, boost::beast::http::detail::chunk_size, boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::beast::http::chunk_crlf>>, boost::beast::buffers_suffix<boost::beast::buffers_cat_view<boost::beast::http::detail::chunk_size, boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::beast::http::chunk_crlf>>, boost::beast::buffers_suffix<boost::beast::buffers_cat_view<boost::beast::http::detail::chunk_size, boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::chunk_crlf>>, boost::beast::buffers_suffix<boost::beast::buffers_cat_view<boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>, boost::beast::http::detail::chunk_size, boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::beast::http::chunk_crlf, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::chunk_crlf>>, boost::beast::buffers_suffix<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::chunk_crlf>>>::emplace<1UL, boost::beast::detail::buffers_ref<boost::beast::buffers_cat_view<boost::asio::const_buffer, boost::asio::const_buffer, boost::asio::const_buffer, boost::beast::http::basic_fields<std::allocator<char>>::writer::field_range, boost::beast::http::chunk_crlf>>>' requested here
        v_.template emplace<1>(fwr_->get());
                    ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/write.hpp:96:17: note: in instantiation of function template specialization 'boost::beast::http::serializer<true, boost::beast::http::basic_string_body<char>>::next<boost::beast::http::detail::write_some_op<boost::beast::http::detail::write_op<boost::beast::http::detail::write_msg_op<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, boost::beast::http::detail::serializer_is_done, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>::lambda &>' requested here
            sr_.next(ec, f);
                ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/write.hpp:86:9: note: in instantiation of member function 'boost::beast::http::detail::write_some_op<boost::beast::http::detail::write_op<boost::beast::http::detail::write_msg_op<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, boost::beast::http::detail::serializer_is_done, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>::operator()' requested here
        (*this)();
        ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/write.hpp:312:9: note: in instantiation of function template specialization 'boost::beast::http::detail::write_some_op<boost::beast::http::detail::write_op<boost::beast::http::detail::write_msg_op<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, boost::beast::http::detail::serializer_is_done, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>::write_some_op<boost::beast::http::detail::write_op<boost::beast::http::detail::write_msg_op<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>, boost::beast::basic_stream<boost::asio::ip::tcp>, boost::beast::http::detail::serializer_is_done, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>>' requested here
        write_some_op<
        ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/asio/async_result.hpp:482:5: note: (skipping 8 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
    BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
    ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/asio/detail/config.hpp:135:37: note: expanded from macro 'BOOST_ASIO_MOVE_CAST'
# define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
                                    ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/write.hpp:270:9: note: in instantiation of member function 'boost::beast::http::detail::write_msg_op<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>::operator()' requested here
        (*this)();
        ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/write.hpp:406:9: note: in instantiation of function template specialization 'boost::beast::http::detail::write_msg_op<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>::write_msg_op<(lambda at <source>:26:25), const boost::beast::http::message<true, boost::beast::http::basic_string_body<char>> &>' requested here
        write_msg_op<
        ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/asio/async_result.hpp:482:5: note: in instantiation of function template specialization 'boost::beast::http::detail::run_write_msg_op::operator()<(lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp>, true, boost::beast::http::basic_string_body<char>, boost::beast::http::basic_fields<std::allocator<char>>>' requested here
    BOOST_ASIO_MOVE_CAST(Initiation)(initiation)(
    ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/asio/detail/config.hpp:135:37: note: expanded from macro 'BOOST_ASIO_MOVE_CAST'
# define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
                                    ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/asio/async_result.hpp:862:21: note: in instantiation of function template specialization 'boost::asio::detail::completion_handler_async_result<(lambda at <source>:26:25), void (boost::system::error_code, unsigned long)>::initiate<boost::beast::http::detail::run_write_msg_op, (lambda at <source>:26:25), boost::beast::basic_stream<boost::asio::ip::tcp> *, const boost::beast::http::message<true, boost::beast::http::basic_string_body<char>> *, std::integral_constant<bool, true>>' requested here
    Signatures...>::initiate(BOOST_ASIO_MOVE_CAST(Initiation)(initiation),
                    ^
/opt/compiler-explorer/libs/boost_1_79_0/boost/beast/http/impl/write.hpp:878:17: note: in instantiation of function template specialization 'boost::asio::async_initiate<(lambda at <source>:26:25), void (boost::system::error_code, unsigned long), boost::beast::http::detail::run_write_msg_op, boost::beast::basic_stream<boost::asio::ip::tcp> *, const boost::beast::http::message<true, boost::beast::http::basic_string_body<char>> *, std::integral_constant<bool, true>>' requested here
    return net::async_initiate<
                ^
1 error generated.
```

Maybe it is a problem with Boost, not with Clang. I can't really understand but it did compile with previous versions.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztW0tzozgQ_jX4orIL8AsffEg8md3U7lQOmdkrJaCxtSMQKwlnMr9-WwL8yNixk7Wd7AwuzFNSt7q_ryWEFInkcfo7c_wZuSULugRCSSwSIKVi-ZxEQijt9K9wi4AqTR4WLF5giqxgHBRJWd4k5VQDJphxihfeoOf2RiQqNUkEpsuFbjKRB6YXxBtiArcrY48ISbQs868ogyy0LpSR53_EbS6SSHDdE3KOV9_xL_4YD6MbCr_1HPeD415V-48l5wSkFNJkrR6M3Hqzl7c5qoqyWR7zMoGEpFJkxOnPlChlDE7_BnMOVrn3JEf5hcZ9XRPZhW8FFxIk3uMsUniwBgu9cDwJ3ebSHI3xbE4JvUVRoCT_QuLMZZmmIFWo8Mi-1fK9wVqB04liWcH3SxwbK5vdylumziiTgwaSAMKJaSZyIlKiHwtAG4w3IEgVE9UZU2EsctSnEhQq-KeE3Dhy9hSy1WkCmjJe366Vk5DuTd-kiakOlwwethOuFdnUwpDoLIk29DIEqW9i1jhMGfBEGSDrpC6Rc4FaG-vO4gWVFts31bMHyTTI6tzmDCWyFY4RFy-QomEsedoUeIPOqeBD6l8O-qB7rivDrlRaUl6in8czs22V5oxvLr0N7f7ElKih539cUslorhv-u57Z-4YEGB6hIgNuSmMiRhseZJBFIEla5rG9tU2JHZCtONcy4ZJM2OUAf0ykwb3SGNEXgFjYhrfNk6NB_cDxR5g5dPwJyQrPqx5lRYgmj1H5GjhVI90lnuVesF3c1s8A-VQothVfBXYFqApn30E2Qd0zzYjvHYLxCr8asCTsKxBVQGzLos_jehOwjSUOgbXlwBu0BvuyHemU543ceu-M3juqHv_By_tLbEHzk4BmZ55No1f5FTYdJ7PAhkpnKPLCUa212i9stYsGjrfzVhuE2yDcEuOtatPgz76A2cEY78uf-0tqyXpqstohs2cHBZZhb_V-vOGm6oU_fZBhF0_noO2YwcRs_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