677c8de4fa
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r2.html#4.2> "Deprecating Vestigial Library Parts in C++17" deprecated, among others, std::allocator::rebind and std::allocator::allocate's hint parameter, and <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0619r4.html#3.9> "Reviewing Deprecated Facilities of C++17 for C++20" removed them completely. (And <https://gcc.gnu.org/git/?p=gcc.git;a=commit; h=954026a7a4e6a1affd1ac5db237ccd75a3316760> "Remove redundant std::allocator members for C++20" removed them from libstdc++ now for -std=c++2a.) The change to boost/bimap/detail/bimap_core.hpp was necessary in Library_pdfimport: > In file included from workdir/UnpackedTarball/boost/boost/bimap/bimap.hpp:61, > from external/boost/include/boost/bimap/bimap.hpp:30, > from sdext/source/pdfimport/inc/pdfiprocessor.hxx:49, > from sdext/source/pdfimport/pdfiadaptor.cxx:27: > workdir/UnpackedTarball/boost/boost/bimap/detail/bimap_core.hpp: In instantiation of ‘class boost::bimaps::detail::bimap_core<boost::bimaps::unordered_set_of<pdfi::GraphicsContext, pdfi::GraphicsContextHash>, boost::bimaps::unordered_set_of<int>, mpl_::na, mpl_::na, mpl_::na>’: > workdir/UnpackedTarball/boost/boost/bimap/bimap.hpp:133:7: required from ‘class boost::bimaps::bimap<boost::bimaps::unordered_set_of<pdfi::GraphicsContext, pdfi::GraphicsContextHash>, boost::bimaps::unordered_set_of<int> >’ > sdext/source/pdfimport/inc/pdfiprocessor.hxx:190:44: required from here > workdir/UnpackedTarball/boost/boost/bimap/detail/bimap_core.hpp:410:7: error: no class template named ‘rebind’ in ‘boost::bimaps::detail::manage_additional_parameters<mpl_::na, mpl_::na, mpl_::na>::case_NNN::allocator’ {aka ‘class std::allocator<void>’} > 410 | > core_type; > | ^~~~~~~~~ [...] The change to boost/format/alt_sstream_impl.hpp was necessary in ExternalProject_libpagemaker: > In file included from libpagemaker_utils.h:22, > from geometry.h:20, > from OutputShape.h:17, > from OutputShape.cpp:10: > external/boost/include/boost/cstdint.hpp:30:2: warning: #include_next is a GCC extension > 30 | #include_next <boost/cstdint.hpp> > | ^~~~~~~~~~~~ > In file included from workdir/UnpackedTarball/boost/boost/format/alt_sstream.hpp:174, > from workdir/UnpackedTarball/boost/boost/format/internals.hpp:24, > from workdir/UnpackedTarball/boost/boost/format.hpp:38, > from PMDExceptions.h:15, > from OutputShape.h:16, > from OutputShape.cpp:10: > workdir/UnpackedTarball/boost/boost/format/alt_sstream_impl.hpp: In instantiation of ‘boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type boost::io::basic_altstringbuf<Ch, Tr, Alloc>::overflow(boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type) [with Ch = char; Tr = std::char_traits<char>; Alloc = std::allocator<char>; boost::io::basic_altstringbuf<Ch, Tr, Alloc>::int_type = int]’: > workdir/UnpackedTarball/boost/boost/format/alt_sstream_impl.hpp:227:9: required from here > workdir/UnpackedTarball/boost/boost/format/alt_sstream_impl.hpp:261:45: error: no matching function for call to ‘std::allocator<char>::allocate(std::size_t&, char*)’ > 261 | newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0); > | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from gcc/trunk/inst/include/c++/10.0.0/memory:64, > from OutputShape.h:13, > from OutputShape.cpp:10: > gcc/trunk/inst/include/c++/10.0.0/bits/allocator.h:164:7: note: candidate: ‘constexpr _Tp* std::allocator< <template-parameter-1-1> >::allocate(std::size_t) [with _Tp = char; std::size_t = long unsigned int]’ > 164 | allocate(size_t __n) > | ^~~~~~~~ > gcc/trunk/inst/include/c++/10.0.0/bits/allocator.h:164:7: note: candidate expects 1 argument, 2 provided Change-Id: Id423f7597fe2e84e57df1d48a2ecc4d636c4a913 Reviewed-on: https://gerrit.libreoffice.org/81584 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
24 lines
920 B
Text
24 lines
920 B
Text
--- boost/bimap/detail/bimap_core.hpp
|
|
+++ boost/bimap/detail/bimap_core.hpp
|
|
@@ -404,8 +404,8 @@
|
|
<
|
|
relation,
|
|
core_indices,
|
|
- BOOST_DEDUCED_TYPENAME parameters::allocator::
|
|
- BOOST_NESTED_TEMPLATE rebind<relation>::other
|
|
+ typename std::allocator_traits<BOOST_DEDUCED_TYPENAME parameters::allocator>::
|
|
+ BOOST_NESTED_TEMPLATE rebind_alloc<relation>
|
|
|
|
> core_type;
|
|
|
|
--- boost/format/alt_sstream_impl.hpp
|
|
+++ boost/format/alt_sstream_impl.hpp
|
|
@@ -258,7 +258,7 @@
|
|
void *vdptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
|
|
newptr = static_cast<Ch *>(vdptr);
|
|
#else
|
|
- newptr = alloc_.allocate(new_size, is_allocated_? oldptr : 0);
|
|
+ newptr = std::allocator_traits<compat_allocator_type>::allocate(alloc_, new_size, is_allocated_? oldptr : 0);
|
|
#endif
|
|
}
|
|
|