-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
When returning an unordered_node_map in a boost::leaf::result from a function, clang won't compile due to incomplete type related to concurrent_node_map.
Also applies to unordered_flat_map.
Please let me know if this should be filed in the leaf repo instead.
Building with clang 22 using --gcc-toolchain=<path-to-gcc-15.2.0>
Reproducible Example
#include "boost/unordered/unordered_node_map.hpp"
#include "boost/leaf/result.hpp"
template <typename T>
boost::leaf::result<T> make_result_error()
{
return boost::leaf::new_error();
}
int main()
{
using map_t = boost::unordered::unordered_node_map<std::string, std::string>;
auto result = make_result_error<map_t>();
return 0;
}Error
auto result = make_result_error<map_t>();
.../boost_1_90_0/include/boost/unordered/concurrent_node_map_fwd.hpp:32:11: note: template is declared here
class concurrent_node_map;
In file included from .../boost_1_90_0/include/boost/unordered/unordered_node_map.hpp:14:
In file included from .../boost_1_90_0/include/boost/unordered/concurrent_node_map_fwd.hpp:19:
In file included from .../gcc-15.2.0/lib/gcc/x86_64-pc-linux-gnu/15.2.0/../../../../include/c++/15.2.0/functional:51:
In file included from .../gcc-15.2.0/lib/gcc/x86_64-pc-linux-gnu/15.2.0/../../../../include/c++/15.2.0/bits/stl_function.h:60:
In file included from .../gcc-15.2.0/lib/gcc/x86_64-pc-linux-gnu/15.2.0/../../../../include/c++/15.2.0/bits/move.h:37:
.../gcc-15.2.0/lib/gcc/x86_64-pc-linux-gnu/15.2.0/../../../../include/c++/15.2.0/type_traits:1159:21: error: static assertion failed due to requirement 'std::__is_complete_or_unbounded(std::__type_identity<boost::unordered::concurrent_node_map<std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>, boost::hash<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::equal_to<std::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>>{})': template argument must be a complete class or an unbounded array
static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}),
Metadata
Metadata
Assignees
Labels
No labels