offset_ptr
with default template parameters is
static const std::size_t offset_type_alignment = 0;
template <class T, class DifferenceType = std::ptrdiff_t,
class OffsetType = std::size_t, std::size_t Alignment = offset_type_alignment>
class offset_ptr;
You can change third parameter of offset_ptr
.
#include <iostream>
#include <boost/interprocess/offset_ptr.hpp>
#include <cstdint>
int main()
{
using namespace boost::interprocess;
offset_ptr<int, std::ptrdiff_t, std::uint32_t> offs;
std::cout << sizeof(offs) << std::endl;
}