Skip to content

Build error with clang-17 std=c++23 and libstdc++-13: invalid application of 'sizeof' to an incomplete type 'caf::config_value' #1583

@vient

Description

@vient
/usr/local/gcc-13/include/c++/13.2.0/bits/unique_ptr.h:97:16: error: invalid application of 'sizeof' to an incomplete type 'caf::config_value'
   97 |         static_assert(sizeof(_Tp)>0,
      |                       ^~~~~~~~~~~
/usr/local/gcc-13/include/c++/13.2.0/bits/unique_ptr.h:404:4: note: in instantiation of member function 'std::default_delete<caf::config_value>::operator()' requested here
  404 |           get_deleter()(std::move(__ptr));
      |           ^
/usr/local/gcc-13/include/c++/13.2.0/bits/stl_construct.h:88:15: note: in instantiation of member function 'std::unique_ptr<caf::config_value>::~unique_ptr' requested here
   88 |         __location->~_Tp();
      |                      ^
/usr/local/gcc-13/include/c++/13.2.0/bits/stl_construct.h:149:12: note: in instantiation of function template specialization 'std::destroy_at<std::unique_ptr<caf::config_value>>' requested here
  149 |       std::destroy_at(__pointer);
      |            ^
/usr/local/gcc-13/include/c++/13.2.0/bits/stl_construct.h:163:11: note: in instantiation of function template specialization 'std::_Destroy<std::unique_ptr<caf::config_value>>' requested here
  163 |             std::_Destroy(std::__addressof(*__first));
      |                  ^
/usr/local/gcc-13/include/c++/13.2.0/bits/stl_construct.h:193:35: note: in instantiation of function template specialization 'std::_Destroy_aux<false>::__destroy<std::unique_ptr<caf::config_value> *>' requested here
  193 |         return std::_Destroy_aux<false>::__destroy(__first, __last);
      |                                          ^
/usr/local/gcc-13/include/c++/13.2.0/bits/alloc_traits.h:947:12: note: in instantiation of function template specialization 'std::_Destroy<std::unique_ptr<caf::config_value> *>' requested here
  947 |       std::_Destroy(__first, __last);
      |            ^
/usr/local/gcc-13/include/c++/13.2.0/bits/stl_vector.h:732:7: note: in instantiation of function template specialization 'std::_Destroy<std::unique_ptr<caf::config_value> *, std::unique_ptr<caf::config_value>>' requested here
  732 |         std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
      |              ^
/home/vient/.conan/data/caf/0.19.2/_/_/package/b9ff73b1322c65f66fadf06ce81bde3c3690e353/include/caf/config_value_reader.hpp:58:3: note: in instantiation of member function 'std::vector<std::unique_ptr<caf::config_value>>::~vector' requested here
   58 |   config_value_reader(const config_value* input, actor_system& sys)
      |   ^
/home/vient/.conan/data/caf/0.19.2/_/_/package/b9ff73b1322c65f66fadf06ce81bde3c3690e353/include/caf/fwd.hpp:98:7: note: forward declaration of 'caf::config_value'
   98 | class config_value;
      |       ^
1 error generated.

std=c++20 works normally. I use 0.19.2 because this is an indirect dependency of some conan package.

Creating the issue right away, I'll try to find some simple fix later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions