Patch diy and upgrade chobo::small_vector to itlib::small_vector for c++20 compatibility
@ben.boeckel can you please help me to understand how to do this upgrade? or perhaps do the upgrade yourself?
Without this patch, I get the below compile errors.
I understand that as a ThirdParty lib, there is a different procedure to merge. I have tried in several other MRs so far, but have been stuck.
!9264 diatomic/diy!70 (closed) third-party/diy2#2
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/dynamic-point.hpp:10:
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp:191:39: error: no type named 'reference' in 'std::allocator<int>'
191 | using reference = typename Alloc::reference;
| ~~~~~~~~~~~~~~~~^~~~~~~~~
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/dynamic-point.hpp:16:28: note: in instantiation of template class 'chobo::small_vector<int, 4>' requested here
16 | class DynamicPoint: public chobo::small_vector<Coordinate_, static_size>
| ^
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/types.hpp:24:15: note: in instantiation of template class 'vtkdiy2::DynamicPoint<int>' requested here
24 | Point min, max;
| ^
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/types.hpp:38:5: note: in instantiation of template class 'vtkdiy2::Bounds<int>' requested here
38 | interval(int from, int to) { DiscreteBounds domain(1); domain.min[0] = from; domain.max[0] = to; return domain; }
| ^
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/Parallel/DIY/vtkDIYUtilities.cxx:3:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/Parallel/DIY/vtkDIYUtilities.h:23:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/master.hpp:14:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/link.hpp:8:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/types.hpp:6:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/dynamic-point.hpp:10:
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp:192:45: error: no type named 'const_reference' in 'std::allocator<int>'
192 | using const_reference = typename Alloc::const_reference;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp:193:37: error: no type named 'pointer' in 'std::allocator<int>'
193 | using pointer = typename Alloc::pointer;
| ~~~~~~~~~~~~~~~~^~~~~~~
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/chobo/small_vector.hpp:194:43: error: no type named 'const_pointer' in 'std::allocator<int>'
194 | using const_pointer = typename Alloc::const_pointer;
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/Parallel/DIY/vtkDIYUtilities.cxx:3:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/Parallel/DIY/vtkDIYUtilities.h:23:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/master.hpp:14:
In file included from /home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/link.hpp:8:
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/types.hpp:45:23: error: no member named 'operator[]' in 'vtkdiy2::DynamicPoint<int>'
45 | using Parent::operator[];
| ~~~~~~~~^
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/types.hpp:59:47: error: type 'vtkdiy2::Direction' does not provide a subscript operator
59 | if (dim > 0 && dir & DIY_X0) (*this)[0] -= 1;
| ~~~~~~~^~
/home/paul/.conan2/p/b/vtkdc2c958da5900/b/src/ThirdParty/diy2/vtkdiy2/include/vtkdiy2/types.hpp:60:47: error: type 'vtkdiy2::Direction' does not provide a subscript operator
60 | if (dim > 0 && dir & DIY_X1) (*this)[0] += 1;
| ~~~~~~~^~