Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with C++ 17 support: The specified type does not meet the requirements of Cpp17MoveInsertable #1013

Open
pavel-odintsov opened this issue Jul 19, 2024 · 1 comment

Comments

@pavel-odintsov
Copy link
Owner

Hey!

I received report from mzar at IRC with following error code:

In file included from /usr/include/c++/v1/__memory/ranges_uninitialized_algorithms.h:22:
4:12 PM 
/usr/include/c++/v1/__memory/uninitialized_algorithms.h:605:17: error: static assertion failed due to requirement '__is_cpp17_move_insertable<std::allocator<dynamic_binary_buffer_t>, void>::value': The specified type does not meet the requirements of Cpp17MoveInsertable
4:12 PM 
  605 |   static_assert(__is_cpp17_move_insertable<_Alloc>::value,
4:13 PM 
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4:13 PM 
/usr/include/c++/v1/vector:990:25: note: in instantiation of function template specialization 'std::__uninitialized_allocator_move_if_noexcept<std::allocator<dynamic_binary_buffer_t>, std::reverse_iterator<dynamic_binary_buffer_t *>, std::reverse_iterator<dynamic_binary_buffer_t *>, std::reverse_iterator<dynamic_binary_buffer_t *>>' requested here
4:13 PM 
  990 |   __v.__begin_   = std::__uninitialized_allocator_move_if_noexcept(
4:13 PM 
      |                         ^
4:13 PM 
/usr/include/c++/v1/vector:1455:3: note: in instantiation of member function 'std::vector<dynamic_binary_buffer_t>::__swap_out_circular_buffer' requested here
4:13 PM 
 1455 |   __swap_out_circular_buffer(__v);
4:13 PM 
      |   ^
4:13 PM 
/usr/include/c++/v1/vector:1467:13: note: in instantiation of function template specialization 'std::vector<dynamic_binary_buffer_t>::__push_back_slow_path<const dynamic_binary_buffer_t &>' requested here
4:13 PM 
 1467 |     __end = __push_back_slow_path(__x);
4:13 PM 
      |             ^
4:13 PM 
/wrkdirs/overlays/local/net-mgmt/fastnetmon-devel/work/fastnetmon-7f0ad9c6cd2db3856607aeed04b5e8125fad3124/src/bgp_protocol.hpp:595:25: note: in instantiation of member function 'std::vector<dynamic_binary_buffer_t>::push_back' requested here
4:13 PM 
The specified type does not meet the requirements of Cpp17MoveInsertable
4:13 PM 
  595 |         attributes_list.push_back(origin_as_binary_array);
4:13 PM 
      |                         ^
@cho-m
Copy link
Contributor

cho-m commented Dec 17, 2024

Seeing this with 1.2.8 release in Homebrew macOS builds

Seems like LLVM implementation doesn't like the lack of move constructor. May need to check if this matches C++ spec (haven't checked on scenario for falling back to copy constructor to meet MoveInsertable).

// Explicitly removed it as we need to implement it properly when needed
dynamic_binary_buffer_t(dynamic_binary_buffer_t&& that) = delete;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants