This repository was archived by the owner on Mar 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
This repository was archived by the owner on Mar 22, 2023. It is now read-only.
Concurrent map get_allocator compilation error #827
Copy link
Copy link
Open
Labels
Type: QuestionFurther information is requestedFurther information is requestedconcurrent_mapNeeds to be resolved to productize concurrent_mapNeeds to be resolved to productize concurrent_map
Description
Hi,
I've got conversion issue in this PR: #825
@vinser52, can you help with this problem?
Environment Information
- libpmemobj-cpp version(s): latest
- PMDK (libpmemobj) package version(s): 1.8
- OS(es) version(s): Fedora 31
- kernel version(s): 5.4.0-42-generic
- compiler, libraries, packaging and other related tools version(s): clang-9
Please provide a reproduction of the bug:
Just compile code #825
How often bug is revealed:
always
Actual behavior:
In file included from /opt/workspace/tests/external/libcxx/map/map.access/max_size.pass.cpp:17:
In file included from /opt/workspace/tests/common/map_wrapper.hpp:15:
In file included from /opt/workspace/include/libpmemobj++/experimental/concurrent_map.hpp:8:
/opt/workspace/include/libpmemobj++/container/detail/concurrent_skip_list_impl.hpp:1825:10: error: no viable conversion from returned value of type 'const allocator<unsigned char, standard_alloc_policy<unsigned char>, object_traits<unsigned char>>' to function return type 'const allocator<pmem::detail::pair<const char, int>, standard_alloc_policy<pmem::detail::pair<const char, int>>, object_traits<pmem::detail::pair<const char, int>>>'
return _node_allocator;
^~~~~~~~~~~~~~~
/opt/workspace/tests/external/libcxx/map/map.access/max_size.pass.cpp:75:9: note: in instantiation of member function 'pmem::detail::concurrent_skip_list<pmem::detail::map_traits<char, int, std::less<char>, pmem::detail::default_random_generator, pmem::obj::allocator<pmem::detail::pair<const char, int>, pmem::obj::standard_alloc_policy<pmem::detail::pair<const char, int> >, pmem::obj::object_traits<pmem::detail::pair<const char, int> > >, false, 64> >::get_allocator' requested here
.get_allocator()));
^
/opt/workspace/include/libpmemobj++/allocator.hpp:485:2: note: candidate constructor not viable: no known conversion from 'const pmem::detail::concurrent_skip_list<pmem::detail::map_traits<char, int, std::less<char>, pmem::detail::default_random_generator, pmem::obj::allocator<pmem::detail::pair<const char, int>, pmem::obj::standard_alloc_policy<pmem::detail::pair<const char, int> >, pmem::obj::object_traits<pmem::detail::pair<const char, int> > >, false, 64> >::node_allocator_type' (aka 'const allocator<unsigned char, standard_alloc_policy<unsigned char>, object_traits<unsigned char> >') to 'const pmem::obj::allocator<pmem::detail::pair<const char, int>, pmem::obj::standard_alloc_policy<pmem::detail::pair<const char, int> >, pmem::obj::object_traits<pmem::detail::pair<const char, int> > > &' for 1st argument
allocator(allocator const &rhs) : Policy(rhs), Traits(rhs)
^
1 error generated.
make[2]: *** [tests/external/CMakeFiles/map_libcxx_max_size.dir/build.make:83: tests/external/CMakeFiles/map_libcxx_max_size.dir/libcxx/map/map.access/max_size.pass.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:31328: tests/external/CMakeFiles/map_libcxx_max_size.dir/all] Error 2
Additional information about Priority and Help Requested:
Are you willing to submit a pull request with a proposed change? Yes
Requested priority: High
Metadata
Metadata
Assignees
Labels
Type: QuestionFurther information is requestedFurther information is requestedconcurrent_mapNeeds to be resolved to productize concurrent_mapNeeds to be resolved to productize concurrent_map